Xymon Mailing List Archive search

PCRE regular expressions (help?)

list Daniel J McDonald
Mon, 02 May 2005 13:29:41 -0500
Message-Id: <user-a06e67d72bad@xymon.invalid>

On Mon, 2005-05-02 at 12:47 -0500, Kauffman, Tom wrote:
I thought I knew what I was doing, but apparently not:

PCRE compile of NORRDDISKS='^/oracle/PRD/sapdata.*' failed

I'm trying to use the patch Henrik so kindly provided earlier.

And what I really want to suppress (shell syntax) is:
/oracle/*/sapdata*
/oracle/*/data?
/oracle/*/mirr*
/oracle/*/orig*

Here's the generic I tried:
PCRE compile of NORRDDISKS='^/oracle/.../sapdata.*| ^/oracle/.../mirr.*|
^/oracle/.../orig.*| ^/oracle/.../data.*' failed
Got to escape the slashes...
NORRDISKs="^\/oracle\/.+?\/(sapdata|mirr|data|orig)'

Which reads:
begins with /oracle/, followed by as few letters as possible before
another slash, then a string starting with sapdata, mirr, data, or orig

-- 
Daniel J McDonald, CCIE # 2495, CNX
Austin Energy

user-290ce4e24e19@xymon.invalid