Arrgghh, Regular Expressions?!?!
| From: | Scott Mebberson | Date: | Mon, 12 Feb 2001 06:59:46 +0000 |
| Subject: | Arrgghh, Regular Expressions?!?! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-39178@lists.php.net to get a copy of this message | ||
Hi guys,
I need to write a regular expression search that can search through a block
of HTML code and find anything similar to these:
<IMG alt="" border=0 hspace=10 src="" vspace=20>
<IMG align=baseline alt="" border=0 hspace=0 src="">
<IMG align=right alt="" border=1 hspace=2 src="" vspace=>
<IMG align=textTop alt="" border=0 hspace=0 src="">
<IMG align=baseline alt="" border=0 hspace=0 src="">
<IMG alt="" border=0 hspace=0 src="">
<IMG alt="" border=2 hspace=0 src="">
<IMG alt="" border=2 hspace=0 src="" style="" vspace=2>
<IMG align=left alt="" border=2 hspace=0 src="" style=""
vspace=2>
And return what I want in an array.
I need the search or piece of code to be able to differ as to which one it
is using, ie/ with align or without align. I need all of the values returned
in an array.
Does anybody think that they could help me out with this one. I know that it
is pretty tricky but I am not that good with reg exp and I need some help.
Anything is very much appreciated. Thanks Guys!!
Scott Mebberson