Name: Apparent Idiot
Date: 11/30/2008 3:11:08 AM
Doesn't work at all.
Title: aspx/php/asp/... urls?
Date: 6/29/2005 11:36:19 AM
good RE pattern, but it matching url's with server code like this:
imho, it's not correct
Date: 11/14/2004 3:04:07 AM
slight modification to allow spaces between the attribute name (src) and the equal sign (=) and value (("|')...("|')), and also betwen the '/' (if present) and '>':
Title: Match <img> tags only
Date: 11/14/2004 2:59:38 AM
matching <img> tags only:
You'll need param 2 (\2); param 1 is for consitent quoting (ending quote is same as beginning).
Don't forget to use single quotes ('; need to escape these then) or escape backslashes (\) when using PHP!
Date: 11/14/2004 2:55:16 AM
You have an error in your expression:
the dot '.' needs to be escaped otherwise it matches any character (ie src="blahblahblahjpg" works, the dot '.' matchs the 'h' from the last blah).
Title: hint fpr php users
Name: d gasser
Date: 7/21/2004 6:20:28 AM
If the expression is used in php, you have to add a backslash in front of the slash in the statement.
Title: Match IMG tag but return SRC property
Name: Lloyd Sturge
Date: 1/23/2004 7:54:34 AM
Thanks David Rolston for your modifications!
I would like to know if there is a way to match the IMG tag but just return the SRC property value. This would eliminate matching other potential tags that also have the SRC property. If this can be done, what changes would be needed for the above regular expression to match any file extension?
Title: Modified src=
Name: David Rolston
Date: 1/22/2004 8:13:06 PM
I think this adds the <img requirement you're looking for. This does suppose that a case insensitive modifier would be applied.