Tutoriel N° 91
Voici le code php
pour transformer
xxx
en
<a href="javascript:go('http://www.google.com/','new')">xxx</a>
<?
//$Text = "http://www.google.com";
$Text = "http://www.google.com";
$Text = preg_replace("/([a-z:/.]*)/",
'<a href="javascript:go('${1}','new')">${1}</a>',
$Text);
$Text = preg_replace("/*)]([a-zA-Z0-9_:/]*)/",
'<a href="javascript:go('${1}','new')">${2}</a>',
$Text);
echo $Text;
?>