It would match the following text:
<font size="2">""hello""</font><a
href="view.aspx?AUTHOR_ID=56789"">click here</a>
In this case, the following text could be anything, and I've just
provided samples:
size="2"
hello
view.aspx
click here
This regex captures two strings - the text inside the font tags and the
text inside the link. In this case, there would be two captured
strings:
hello
click here
This looks wrong to me - the double quotes ("") should probably be
single quotes ("):
<font[^>]+>"([^"]*)"</font>[^?]+\?AUTHOR_ID=[0-9]+">([^<]*)</a>
One trick to figure out a difficult Regex is to use Regulator's
analyzer output (
http://regex.osherove.com/). The output in this case
is as follows:
<font
Any character not in ">"
+ (one or more times)
Capture
Any character not in """"
* (zero or more times)
End Capture
""</font>
Any character not in "?"
+ (one or more times)
?AUTHOR_ID=
Any character in "0-9"
+ (one or more times)
"">
Capture
Any character not in "<"
* (zero or more times)
End Capture
</a>
- Jon
http://weblogs.asp.net/jgalloway