Re: Just a quick regular expression question!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gene...

Try this....if u have found any pbm ,mail me

$string ="This is a <a href='http://www.ur1.com'>Hyperlink</a> and this

is a <a href='http://www.ur2.com'> Hyperlink</a>";

echo 'Before => '.$string;

$string = ereg_replace('(.*)(http:\/\/www.ur1)(.*)',
'\\1javascript:\\2\\3', $string);

echo '<br>After => '.$string;

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux