dw
public text v1 · immutable<?
$string = "slcmdlmcdlcmdlcmdlmdlmd10.1.0.2cldmlcdmcldmcldmc()";
$regex = "(\d{1,3}\.){2}\d{1,3}";
$search = preg_match("$regex", $string, $matches);
if ($search) {
$ip = $matches[0];
$test = long2ip(ip2long($ip));
if ($test != "0.0.0.0") {
echo "$test\n";
} else {
echo "That aint no IP sucka!";
}
}
?>