.NET 2.0 beta and regex regular expressions

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Hi

Since VS.NET 2005(Whidbey) has not been released, it is still in the beta
test period, so the behavior may be different from the final release.
So far Whidbey issue is not officially supported.
For Whidbey issue, you may try to post in vs2005 forum.
http://lab.msdn.microsoft.com/vs2005/community/

Thanks for your understanding!


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top