[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] IP address regex golf



Sorry about the last message, one stray keystroke and the spaceship goes
to Mars instead of Venus. :-)

|>>       1x4==join"",map$_<256,/\G(\d+)(?:\.|\z)/g;
|Mine (the 1x4 one) works.

No. Try 1.257.1.1.1

|1x4 is no different from 1010101 if you join on
|"" instead of 0.

The difference is that false and "" are indistinguishable here, but false
and 0 aren't.

Brian

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe