RSS Forums RSS
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting

Matching multiple href="Something.aspx" using RegEx

Join Date: May 2006
Location: Bellevue, WA
Posts: 1,546
Reputation: Infarction has a spectacular aura about Infarction has a spectacular aura about Infarction has a spectacular aura about 
Rep Power: 8
Solved Threads: 51
Sponsor
Infarction's Avatar
Infarction Infarction is offline Offline
Battle Programmer

Re: Matching multiple href="Something.aspx" using RegEx

  #2  
Jul 24th, 2007
regex: href=\"[^\"]\.aspx\"

Yours was matching from the first href to the end of the second one because of the .* whereas mine allows anything except for a closing quote (and therefore stops at the end of the first one). It's not as anal as I usually get with regex, but as long as you have well-formed XHTML it should work.
Last edited by Infarction : Jul 24th, 2007 at 11:37 pm.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 5:36 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC