Richard Bucker

regex for IP address matching

Posted at — Jan 3, 2013

If you’re looking to splice an IP address from a document and there is a 100% chance that the IP address is properly formatted then why the F**k would you want a regex like this:

In the worst case the regex might look like:

But even this is abusive.