Hi again,
I hope u can help me with this. I have to parse an html file and replace
src attribute of an img. I'm using 'preg_match_all' but it seems i'm
having problem with patterns. This is the part of code that should find
the appropriate img src:
$preg='/<img(.*?)src=[\'|"]'.addcslashes($original,"/").'[\'|"](.*?)>/si';
if (preg_match_all($preg,$arrFile,$match))
{
echo $match[1][0];
}
where $original contains the value of src that it should find. For expl,
$original can be: ../../MyMCMSSite/images/pic1_abeoway.gif.
But the problem is it's not catching the right img src.
Hope u can help me.
Thx a lot
Alia
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php