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\\.)|(
Looks right. Personally, I'd change the first one to:
^127\.0
With this: (^127\.0\.0\.1) you looking for anything that starts with 127.0.0.1 and will miss out on 127.0.0.2*, 127.0.2.*, 127.0.* etc.
(^127\.0\.0\.1)
127.0.0.1
127.0.0.2*
127.0.2.*
127.0.*