Title |
Test
Find
Image without alt attribute (.Net only)
|
Expression |
\<img ((src|height|width|border)=:q:Wh*)*/\> |
Description |
This regex is good for finding image tags without alt tags. I used this for working on Section 508 compliance. This is a M$ flavored regex and probably won't work with anything else. |
Matches |
<ol><li><img src="pic.gif" width="84" height="119" border="0" /></li><li><img src="pic.gif" width="84" height="119"/></li><li><img src="pic.gif" width="84" border="0" /></li><li><img src="pic.gif" height="119" border="0" /></li><li><img src="pic.gif" border="0" /></li><li><img src="pic.gif" height="119" /></li><li><img width="84" height="119" border="0" src="pic.gif" /></li><li><img src="pic.gif"/></li><li><img src="pic.gif" /></li></ol> |
Non-Matches |
Any img tag with:<br><ol><li>An alt attribute</li><li>Javascript event function</li><li>Unquoted attributes</li><li>The ending / missing</li></ol> |
Author |
Rating:
Not yet rated.
Richard Binnington
|
Source |
|
Your Rating |
|