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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Title Anchor Tags
Expression
<a((?:(?! title=)[^">]*"[^">]*")+)>([^<]+)<\/a>
Description
Use the above pattern with this replacement pattern: "<a\1 title="\2">\2</a>" and it will put title tags in all of your anchors that don't have a title tag.
Matches
&lt;a href="/"&gt;Home&lt;/a&gt; | &lt;a href="/" style="font-size: 30px"&gt;Home&lt;/a&gt;
Non-Matches
&lt;a href="/"&gt;&lt;span style="font-size: 30px"&gt;Home&lt;/span&gt;&lt;/a&gt;
Author Rating: Not yet rated. Kerry Jones
Source
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-2018, RegexAdvice.com | ASP.NET Tutorials