RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Match MediaWiki Internal and External Links
Expression
(?<=\r\n)\[.*\]
Description
This will match both internal and external links from mediawiki content. IT should also work for all wiki types that use both single and double square brackets "[ and ]". it will NOT MATCH a link surrounded by a header. Square brackets are tricky because they are used in Regular Expressions and must use the metacharacter to match them
Matches
[[Example Internal Wiki Link Double Square Brackets]] | [https://regexlib.com Example External Wiki Link] | [[Another Internal Link]]
Non-Matches
=== HEADING 3 === | A Simple String of Text not surrounded by anything | ===[[Will Not Match a link surrounded by a header]]===
Author Rating: Not yet rated. Matthew Reinsmith
Source mreinsmith
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials