On 2019-01-25 18:31, Michael Orlitzky wrote:
On 1/25/19 11:32 AM, Kai Peter wrote:
Really interesting _how_ people think. Find the error:
You're not even trying:
$ echo 0.0.0.0 | sed 's/\.0/\./g' | sed 's/^0//g' | \
sed 's/\.0/\./g' | sed 's/\.\./.0./g' | sed 's/^0//g'
.0..
True, but that wasn't requested.
It's trivial to enumerate all "valid" (that is, without leading zeros)
IP addresses. The most basic test that any regex should pass is that it
should do nothing on those examples.
+1
--
Sent with eQmail-1.11 beta - a fork of djb's famous qmail