At the time I wasn't aware of a better method.
You could just use $longip instead of a regex:

Code:
if ($longip(<ip>)) { 
  ; <ip> is valid.
}
else {
  ; <ip> is invalid.
}


New username: hixxy