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

Matching multiple href="Something.aspx" using RegEx

Join Date: Apr 2007
Location: Glasgow::Scotland
Posts: 10
Reputation: Blackred is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
Blackred's Avatar
Blackred Blackred is offline Offline
Newbie Poster

Matching multiple href="Something.aspx" using RegEx

  #1  
Jul 24th, 2007
This is really a regular expression question opposed to a .NET but I can't see any forum that specialises in that kind of thing, so as I'm using ASP.NET I figured I'd post it here

I have a string as such...

<ul>
  <li>
    <a href="Welcome.aspx">Welcome</a>
  </li>
  <li>
    <as href="About.aspx">About us</a>
  </li>
</ul>


And I want to match each of the href="*" and replace them, however my regular expression skills are non-existant! I've got this far...

href=".*\.aspx" but that returns just one match:

href="Welcome.aspx">Welcome</a>
</li>
<li>
<as href="About.aspx

Which isn't very useful... can anyone fix my regular expression?

Cheers,
Blackred.
This station is non-operational.
AddThis Social Bookmark Button
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 5:34 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