Xymon Mailing List Archive search

PCRE regular expressions (help?)

list Tom Kauffman
Mon, 2 May 2005 14:17:50 -0500
Message-Id: <user-a5c6c59aadf7@xymon.invalid>

I thought about the escapes -- but PCRE doesn't seem to like this any
better: PCRE compile of
NORRDDISKS='^\/oracle\/.+?\/(sapdata|data|orig|mirr)' failed (and the
original needs to have a double \\ in each spot, to escape the escape,
for the shell export).

Thanks

Tom

-----Original Message-----
From: Daniel J McDonald [mailto:user-290ce4e24e19@xymon.invalid] 
Sent: Monday, May 02, 2005 1:30 PM
To: Hobbit List
Subject: Re: [hobbit] PCRE regular expressions (help?)

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