[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

regex help

i have a line in a log that looks like this:

   8:12:03  Netmail: 0,  Personal: 0,  Hudson: 0,  JAMbase: 0

it's the only line i want to print from the log so i use 
-em "Netmail:"

my colorscheme looks like this:

cs_re:black,yellow,inverse:.*Netmail: [1-9].*
cs_re:black,yellow,inverse:.*Hudson: [1-9].*

the line prints bright magenta  on black, UNLESS the netmail: or
hudson: field is non-zero, in which case it prints yellow.

i want to do the same kind of thing for the following line (watch for

  29-Mar-2006 08:00:55 Session traf: in: 0 (0b) out: 0 (0b)

i use -em "Session traf:" to make sure the line is printed.

i want it printed red unless in: or out: are non zero. my colorscheme
looks like:

cs_re:black,red,inverse:.*Session traf:.*

the problem is:  it's not working. the regex seems obvious to me (and
the same type of thing works in the previous example), but i can't get
it to work for the second colorscheme.

both of these logs are merged to the same window. this is 

am i missing something obvious with the regex?