View Single Post
Old 10-14-2014, 08:52 PM   #8
WhiteAbeLincoln
Junior Member
WhiteAbeLincoln began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Oct 2014
Device: none
I know that this thread is reallly old, and Leonatus's request is also really old, but heres a regex for you and a break down
Quote:
<span class="\w*"><a class="[A-Za-z_ \d]*" id="[A-Za-z_ \d]*">\[[A-Za-z_ \d]*\]<\/a><\/span>
.

\w* matches zero or more word characters (alphanumeric and _)
[A-Za-z_ \d]* matches zero or more characters between A-Z, a-z or _ (underscore) or a digit or a space

everything else is pretty much an exact match. the random backslashes are escape characters (so the following char isn't interpreted as a regex part) e.g \/ escapes / char, and \[ escapes [ char

http://www.regexr.com/ is a great website for quickly and easily building regexs, and they have a reference sidebar so you can look up syntax etc.

Last edited by WhiteAbeLincoln; 10-14-2014 at 08:54 PM.
WhiteAbeLincoln is offline   Reply With Quote