/^(?:(25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9
]|[0-1][0-9]{2}|[1-9]{1,2})$/

shortened from stephen's just a bit.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 20, 2002 9:17 AM
> To: [EMAIL PROTECTED]
> Subject: RE: AW: how to make a regex for a ip address
> 
> 
> /^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]
> )\.(25[0-5]|2[
> 0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]
> |2[0-4][0-9]|[
> 0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9
> ]|[0-1]{1}[0-9
> ]{2}|[1-9]{1}[0-9]{1}|[0-9])$/ 
> 
> Stephen Redding
> 
> BT Ignite Solutions
> Telephone - 0113 237 3277
> Fax - 0113 244 1413
> Email - [EMAIL PROTECTED]
> http://www.technet.bt.com/sit/public/
> 
> 
> British Telecommunications plc
> Registered office: 81 Newgate Street London EC1A 7AJ
> Registered in England no. 1800000
> This electronic message contains information from British 
> Telecommunications
> plc which may be privileged or  confidential. The information 
> is intended to
> be for the use of the individual(s) or entity named above. If 
> you  are not
> the intended recipient be aware that any disclosure, copying, 
> distribution
> or use of the contents of  this information is prohibited. If you have
> received this electronic message in error, please notify us 
> by  telephone or
> email (to the numbers or address above) immediately.
> 
> 
> 
> -----Original Message-----
> From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 20, 2002 14:13
> To: Nikola Janceski; 'Samy Kamkar'; 'Angerstein'
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: AW: how to make a regex for a ip address
> 
> 
> oh and anything else after that last .
> 
> 000255.000255.000255.000255.slkfdja;ljd;alkjf;lajkd;ljkasfljka
> ;ljdkf;lajsdl;
> jkf;lsajd
> 
> > -----Original Message-----
> > From: Nikola Janceski 
> > Sent: Tuesday, August 20, 2002 9:12 AM
> > To: 'Samy Kamkar'; Angerstein
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: AW: how to make a regex for a ip address
> > 
> > 
> > But that would match
> > 
> > 000255.000255.000255.000255.
> > 
> > hehehe :)
> > 
> > I like the split loop check.
> > 
> > > -----Original Message-----
> > > From: Samy Kamkar [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, August 20, 2002 9:02 AM
> > > To: Angerstein
> > > Cc: [EMAIL PROTECTED]
> > > Subject: Re: AW: how to make a regex for a ip address
> > > 
> > > 
> > > /^(?:0*(?:2(?:[0-4]\d|5[0-5])|1?\d{1,2})(?:\.|$)){4}/
> > > 
> > > -Samy
> > > 
> > > Angerstein wrote:
> > > 
> > > > What about:
> > > > /\d?\d?\d\.\d?\d?\d\.\d?\d?\d\.\d?\d?\d\/
> > > > 
> > > > or
> > > > 
> > > > @ip = split (/\./);
> > > > foreach $part (@ip) {
> > > >         if ( $part > 255 && $part =~ /\d?\d?\d\/ ) {
> > > >                 die "That´s not an IP";
> > > >         }
> > > > }
> > > > 
> > > > 
> > > >>-----Ursprüngliche Nachricht-----
> > > >>Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im 
> > > Auftrag von
> > > >>zentara
> > > >>Gesendet am: Dienstag, 20. August 2002 14:50
> > > >>An: [EMAIL PROTECTED]
> > > >>Betreff: Re: how to make a regex for a ip address
> > > >>
> > > >>On Mon, 19 Aug 2002 12:07:21 -0700, [EMAIL PROTECTED] 
> > > (Root) wrote:
> > > >>
> > > >>>for a one liner:
> > > >>>
> > > >>>$_ = '12.34.56.78';
> > > >>>map {$_ < 256} /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/g || warn("not
> > > >>>
> > > >>valid ip: $_\n");
> > > >>
> > > >>I tried this with $_ = '1234.2345.56.78';  and received 
> > no warning.
> > > >>That's not good.
> > > >>
> > > >>
> > > >>
> > > >>--
> > > >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > >>For additional commands, e-mail: [EMAIL PROTECTED]
> > > >>
> > > >>
> > > >>
> > > > 
> > > > 
> > > 
> > > 
> > > -- 
> > > Samy Kamkar -- cp5 -- [EMAIL PROTECTED]
> > > LucidX.com / LA.pm.org / code.LucidX.com
> > > 
> > > 
> > > -- 
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > 
> > 
> 
> --------------------------------------------------------------
> --------------
> --------------------
> The views and opinions expressed in this email message are 
> the sender's
> own, and do not necessarily represent the views and opinions of Summit
> Systems Inc.
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to