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

Re: [FWP] IP address regex golf



Keith Calvert Ivey wrote:
> 
> false positives for things like 10000.1.2.3.4, since '1111' ==
> '01111').

Drat, just after I sent this:

    1010101==join 0,map$_<256,/\G(\d+)(?:\.|\z)/g;

Oh well, add one more stroke:

    1010101eq join 0,map$_<256,/\G(\d+)(?:\.|\z)/g;

-- 
Rick Delaney
rick.delaney@home.com

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