Xymon Mailing List Archive search

regex question

4 messages in this thread

list Marco Avvisano · Wed, 3 Sep 2008 09:13:33 +0200 ·
I need to check the log string "ERROR  |", but i
don't know the right way to use the character "|"
not as OR 
I know that not exits a escape character in hobbit regex.

Any suggestions,

Thanks
list Lars Ebeling · Wed, 3 Sep 2008 12:19:17 +0200 ·
Escape character is \

Lars

----- Original Message ----- From: "Marco Avvisano" <user-e09c0f3f8c70@xymon.invalid>
To: <user-ae9b8668bcde@xymon.invalid>
Sent: Wednesday, September 03, 2008 9:13 AM
Subject: [hobbit] regex question
quoted from Marco Avvisano

I need to check the log string "ERROR  |", but i
don't know the right way to use the character "|"
not as OR I know that not exits a escape character in hobbit regex.

Any suggestions,

Thanks

list Marco Avvisano · Thu, 4 Sep 2008 09:15:37 +0200 ·
I try to insert "\" in my hobbit-client.cfg, but not work

 LOG /mylog.log  %ERROR*\| COLOR=red

May be that i remember that Henrik say that no escape character are 
required?

Marco
quoted from Lars Ebeling


----- Original Message ----- 
From: "Lars Ebeling" <user-1fecd3eafd52@xymon.invalid>
To: <user-ae9b8668bcde@xymon.invalid>
Sent: Wednesday, September 03, 2008 12:19 PM
Subject: Re: [hobbit] regex question

Escape character is \

Lars

----- Original Message ----- 
From: "Marco Avvisano" <user-e09c0f3f8c70@xymon.invalid>
To: <user-ae9b8668bcde@xymon.invalid>
Sent: Wednesday, September 03, 2008 9:13 AM
Subject: [hobbit] regex question

I need to check the log string "ERROR  |", but i
don't know the right way to use the character "|"
not as OR I know that not exits a escape character in hobbit regex.

Any suggestions,

Thanks

list Henrik Størner · Tue, 30 Sep 2008 12:12:12 +0000 (UTC) ·
quoted from Marco Avvisano
In <004a01c90e5e$086bd890$user-582c04793b44@xymon.invalid> "Marco Avvisano" <user-e09c0f3f8c70@xymon.invalid> writes:
I try to insert "\" in my hobbit-client.cfg, but not work
LOG /mylog.log  %ERROR*\| COLOR=red
Shouldn't that be ".*" instead of just "*" ?

  LOG /mylog.log  %ERROR.*\| COLOR=red

I don't believe the backslash-escape is needed.


Henrik