I am newbie with regex and I want to use preg_match function to find if a string is an IP address.

For example,

$string = "10.0.0.1";
preg_match($regex, $string);

should return true. So, what $regex should be?

Edit
Report