IP RegEx
Simple IP RegEx
/\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b
Let's break down this regular expression into smaller parts.
\d{1,3} matches decimal number at least 1 time but no more then 3 times. It is repeated 4 times to match each individual part of the IP address.
Router database example
In this example IP address is matched in Apache .htaccess file.