RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
<\s*a\s[^>]*\bhref\s*=\s* ('(?<url>[^']*)'|""(?<url>[^""]*)""|(?<url>\S*))[^>]*> (?<body>(.|\s)*?)<\s*/a\s*>
Description
Suitable for extraction of all hyperlinks in the format: <a ... href="..." ...> some text </a> from a text document. Separates in groups the components of the links (url and body).
Matches
<a href="javascript:'window.close()'">close the window</a> | <a target=&quo
Non-Matches
<aa href="test.htm">test</a> | < a href hr = 'http://www.nakov.com'>...&
Author Rating: The rating for this expression. Svetlin Nakov
Source http://www.nakov.com/dotnet-project/
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials