I have the following function
function IsValidIpAddress( $IP )
{
$result = preg_match("/^([1-9]|[01]?\d\d|2[0-4]\d|25[0-5])\.(\d|[01]?\d\d|2[0-4]\d|25[0-5])\.(\d|[01]?\d\d|2[0-4]\d|25[0-5])\.(\d|[01]?\d\d|2[0-4]\d|25[0-4])$/",$IP,$matches);
return $result;
}
it matches address well but also matches address like
192.009.012.254
Any ideas on how i can fix this regex