Page 1 of 1

Regex

Posted: Sat May 11, 2013 10:01 am
by sysmo
I'm kind of struggeling with the regex syntax.
i;ve managed te obviouse "all" : .*
and grouping by first characters of the name : ^Site-1.*
but i'm kind of lost on the rest. eg. how to exclude just two hosts from the .* expression or an regex to match characters in the middle (eg regex for 'router' to match the hosts Site1-router-881 and Site-2-router-887)

Is there an simple tutorial for regex as nagios uses it?

Re: Regex

Posted: Mon May 13, 2013 9:33 am
by yancy
sysmo,

Are you using regular expressions to define hostgroups?

a great resource for regular expressions can be found here:

http://www.regular-expressions.info

Thanks,

-Yancy