I want to differentiate between the following 2 html tags using php + regex expression. How do i go about doing it.
<a href="/"><img src="/nyp/slot/u100/style/homepage/logo.jpg" alt="" hspace="2"/>
and
<a href="/"><img src="/nyp/slot/u100/style/homepage/logo.jpg" alt="" hspace="2" />
Notice that the 2nd html img tab has a “space” before the closing.
Appreciate any expert advice.
The above will match img tags that do not have a space before the
/character. So it will match img tags like this:<img src="" alt=""/>