G
Guest
Hi, I'm porting an app. from .NET 1.1 to .NET 2.0 and unfortunately the
existing regexs don't work. Theres no mention of problems or differences
with regex in the current beta release of .NET 2.0, I'm just wondering if my
original expression was 'broken'?
The regex is:
Regex hrefExpression = new
Regex("href\\s*=\\s*[\"']?((?:[^>]|[^\\s]|[^\"]|[^'])+)[\"']?");
it's purpose is to extract URLs from HTML links.
In .NET 1.1 it will take a string like
<a href=blah.html></a>
and give me a group with blah.html
In .NET2 it seems to match everything after the URL aswell.
Any ideas?
Only thing I found on the net was a guy with the same problem:
http://groups-beta.google.com/group...+2.0+beta+regex&rnum=1&hl=en#343595f830499738
Thanks
Jim
existing regexs don't work. Theres no mention of problems or differences
with regex in the current beta release of .NET 2.0, I'm just wondering if my
original expression was 'broken'?
The regex is:
Regex hrefExpression = new
Regex("href\\s*=\\s*[\"']?((?:[^>]|[^\\s]|[^\"]|[^'])+)[\"']?");
it's purpose is to extract URLs from HTML links.
In .NET 1.1 it will take a string like
<a href=blah.html></a>
and give me a group with blah.html
In .NET2 it seems to match everything after the URL aswell.
Any ideas?
Only thing I found on the net was a guy with the same problem:
http://groups-beta.google.com/group...+2.0+beta+regex&rnum=1&hl=en#343595f830499738
Thanks
Jim