[hobbit] PCRE expression question
Charles Goyard
charles.goyard at orange-ftgroup.com
Wed Apr 18 17:54:00 CEST 2007
Hi,
Galen Johnson wrote :
>
> This works:
>
> PORT "LOCAL=%[\.:](8611|8621|8631)$" state=LISTEN
>
> But this doesn't...
>
> PORT "LOCAL=%[\.:]86?1$" state=LISTEN
>
> I'm hoping fresh eyes will see what stupid thing I've missed...
That's because "?" matches 0 or 1 character, and applies to the 6. Try :
PORT "LOCAL=%[\.:]86[0-9]1$" state=LISTEN
(means 86 then some number, then 1, then end)
? has not the same meaning in pcre than in shell.
--
Charles Goyard - charles.goyard at orange-ftgroup.com - (+33) 1 45 38 01 31
Orange Business Services - online multimedia // ingénierie
More information about the Xymon
mailing list