Private IP Address Identifier in Regular Expression
- by caseyamcl
Hey I'm a total n00b at Regular Expressions. I'm wondering if this is the best way to match a string that starts with a private IP address (Perl-style Regex):
(^127\.0\.0\.1)|(^192\.168)|(^10\.)|(^172\.1[6-9])|(^172\.2[0-9])|(^172\.3[0-1])
Thanks much!