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

Re: [FWP] IP address regex golf



>>>>> "KCI" == Keith Calvert Ivey <kcivey@cpcug.org> writes:

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

and here is where you could replace && with & and get away with it (tested):

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

unfortunately < binds higher than | or you could lose those parens.

i love seeing all this golf energy here. hope some of you enter the
tournament at tpc4!

uri (dictator^Wdirector of the PGA)

-- 
Uri Guttman  ---------  uri@sysarch.com  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com

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