Regex errors
Posted: Tue Jan 13, 2009 4:14 am
Hi for all.
I am trying to find in a string for <img> HTML codes for extract. I waht to catch onde the src, in <img> tag. It's possible?
Excample of input
Code that's not working
Something wrong?
Tanks.
I am trying to find in a string for <img> HTML codes for extract. I waht to catch onde the src, in <img> tag. It's possible?
Excample of input
Code: Select all
Balalalal lalsldsf <img src="imgteste. jpg" align="left" height="99" width="130" alt="photo" title="eteste " border="0"/> dfgdfgdfgdfgCode that's not working
Code: Select all
if(preg_match('@<img (.*?)/>@', $desc, $matches)){
echo ($matches[0]);
}
Tanks.