RE: Regexp help in getting the IP address

"Sarika Inamdar " <[email protected]> Wed, 11 Jun 2003 14:10:26 +0530
Newsgroups gmane.comp.jakarta.regexp.user
Message-ID <[email protected]>
Thanks Much for the help. Now it works fine with the regexp.

-Sarika

> -----Original Message-----
> From: Schamil Wackenhut [mailto:[email protected]] 
> Sent: Wednesday, June 11, 2003 2:01 PM
> To: Regexp Users List; [email protected]
> Subject: Re: Regexp help in getting the IP address
> 
> 
> * Schamil Wackenhut meinte:
> 
> > * Sarika Inamdar meinte:
> > 
> > > Threshold12310.77.11.922003-06-05T06:20:00.171Z.
> > > ...
> > > Threshold\d+([0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3})\d{4}-.*
> > > 
> > > This is extracting me the following :
> > > 
> > > 310.77.11.92
> > 
> > Try this: 
> > 
> Threshold\d{3}([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0
> > -5])\.
> > ([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\d{4}-.*
> 
> I forgot the parenthesis around the main expression:
> 
> Threshold\d{3}(([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-
> 4]\d|25[0-5])\.
> ([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5]))\d{4}-.*
> 
> -- 
> You know my name - look up my number. (The Beatles)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
>