"Yes, but..."
There are plenty of situations, such as parsing server logfiles, where four-part IP addresses are a given. In these cases, using a regex is just fine.
The only case I've actually run across in practice where using a regex isn't safe is when parsing URLs where some spammer has obscured an IP address by using a non-standard forms.
In reply to Re: Don't Use Regular Expressions To Parse IP Addresses!
by dws
in thread Don't Use Regular Expressions To Parse IP Addresses!
by ybiC
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |