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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
<(\/{0,1})img(.*?)(\/{0,1})\>
Description
This regular expression allows you to match all image tags
Matches
<img src="immy.jpg" alt="Image"> | <img src="immy.jpg" alt=&q
Non-Matches
< img >
Author Rating: The rating for this expression. Alessandro Pellegrini
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

Title: Fails when the alt text contains >
Name: Randal L. Schwartz
Date: 3/11/2005 10:17:34 AM
Comment:
Do not parse HTML with regex. Use a real regex parser. Like most regex that parse HTML, this one fails if the alt text contains a greater-than, which is perfectly legal.


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