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

Re: [FWP] IP address regex golf



At 28 Apr 00 17:41, Peter Scott <Peter@PSDT.com> wrote:

Peter Scott <Peter@PSDT.com> wrote:

>    /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/&&!((1|$1|$2|$3|$4)&256)

That doesn't work.  Try 512.1.1.1, for example, or anything 
else that has a number greater than 256 without the 256 bit 
set.  Try this:

    /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/&&($1|$2|$3|$4)<256

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC

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