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.