Help with regex


#1

I need help to use regex to organize my hosts.
I put this in my hostgroups_nagios2.cfg

…]
define hostgroup {
hostgroup_name radios_net6
alias rede radios net6
members radio_10.6.*
}
define hostgroup {
hostgroup_name radios_net64
alias rede radios net64
members radio_10.64.*
}
…]

but with this, the hosts with name starting with 10.64 is showing in both hostgroups radios_net6 and radios_net64.


#2

If i’m not mistaken in regexes the dot stands for “any character” so you may want to check how to define a sinlge dot in a regex.


#3

actually im using wildcard, not the real regex (use_true_regexp_matching=0).

the format 10.6..* didnt work.