[hobbit] PCRE expression question
Galen Johnson
Galen.Johnson at sas.com
Wed Apr 18 18:24:33 CEST 2007
I tried the '.' as well with the same issue (kept showing 0 instances)...I think I'll just go with the [1-9]...thanks.
=G=
-----Original Message-----
From: Paul van Eldijk [mailto:P.vanEldijk at uci.ru.nl]
Sent: Wednesday, April 18, 2007 11:44 AM
To: hobbit at hswn.dk
Subject: Re: [hobbit] PCRE expression question
Galen Johnson schreef:
> Hey,
>
> I know I'm just missing something simple and it's probably something I've overlooked but I'm having an issue with a regex in one of my port tests...
>
> This works:
>
> PORT "LOCAL=%[\.:](8611|8621|8631)$" state=LISTEN
>
> But this doesn't...
>
> PORT "LOCAL=%[\.:]86?1$" state=LISTEN
6? matches zero or one 6, so that is not what you want.
6. matches a six, followed by any character 6[1-3] matches a 6 followed by a one, two or three.
So you want:
PORT "LOCAL=%[\.:]86[1-3]1$" state=LISTEN
HTH,
Paul
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
More information about the Xymon
mailing list