IP Address Regular Expression
OK, I have this wonderful regular expression that replaces IP addresses in a variable. The catch is that I want to replace the IP address with the same IP address, just with a link around it that you can click on for further information.
On the example below, I need to replace the $ip with the actual IP address from the expression.
$msg = ereg_replace("([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})", "<a href=\"script.php?$ip\">$ip</a>", $msg);
Can anyone help me?
----------
~cmiller
__________________
----------
~cmiller
|