Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- why this regex doesn't work?


zozzen - 12:41 pm on Mar 26, 2008 (gmt 0)


hi, i tried both preg_replace and eregi_replace before. The code is like this:

$output = eregi_replace("<span class=a>(.*?)</span><a class=fl(.*?)</a>(.*?)<a class=fl(.*?)</a>", "hello word", $output);

and...
$output = preg_replace("/<span class=a>(.*?)</span><a class=fl(.*?)</a>(.*?)<a class=fl(.*?)</a>/is", "hello world", $output);

but it seems both sentences doesn't work too. very frustrated.....


Thread source:: http://www.webmasterworld.com/php/3609369.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com