[Israel.pm] (no subject)

Chanan Berler chananb at centerity.com
Wed Feb 4 07:56:08 PST 2009


Hi All,

I am trying for an hour not to parse this string, thought maybe someone has
a better idea:

I need to extract the 'and ' 'or' and 'not' from the statement, still keep
the order (since I need to rebuild the string into sql statement)
Problem: the Service/ServiceGroup or Host/HosName can have the word 'and' /
'or' / 'not'  inside

Str = "HostGroup='generic-hostgroup' and Attempt='5' and
ServiceGroup='Sample Service View' or Service='WINDOWS CPU' and
State='Critical' and REGEX=(| and Mem: (.*?)%|,=,80)

Does anyone has any idea ? maybe just the start..
Thanks
Chanan




More information about the Perl mailing list