Re: Regexp help in getting the IP address
Schamil Wackenhut <[email protected]> Wed, 11 Jun 2003 10:23:56 +0159
| Newsgroups | gmane.comp.jakarta.regexp.user |
|---|---|
| Message-ID | <20030611082418.GA27511@fuckup> |
* 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}-.*
Or Threshold\d+ if there are more than 3 numbers after Threshold...
ciao,
schamil
--
You know my name - look up my number. (The Beatles)