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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Pattern Title
Expression
<a\s*.*?href\s*=\s*['"](?!http:\/\/).*?>(.*?)<\/a>
Description
Finds all local links, but doesnt match on external links. Use replace with $1 to leave the link text but remove the link.
Matches
<a href='locallink.htm'>my local link</a> | <a title='click here' href="/a/local
Non-Matches
<a href='http://www.site.com/page.htm'>www.site.com</a> | <a href='http://www.site.co
Author Rating: Not yet rated. james mountain
   Displaying page 1 of 1 pages; Items 1 to 1

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