jay_41157
Sep 05, 2008Nimbostratus
wildcard in data group.
Hi ,
I am trying to use \apple\* --> * being wildcard... but i do not have the correct fromat.. in the data group. is there an escape squence ?
thanks
If not, you could either replace the class with a switch statement and use the glob flag for wildcard matching, or if you like the class, you could replace matchclass with a foreach loop:
when RULE_INIT {
Create a test class (actually a list in this case)
set ::test_class [list abcd abcde abcdef* abcdefg*]
foreach element $::test_class {
log local0. "Current \$element: $element"
if {[string match -nocase $element "ABCDEFG"]}{
log local0. "Matched \$element: $element. Exiting loop."
break
}
}
}
Log output:
Rule : Current $element: abcd
Rule : Current $element: abcde
Rule : Current $element: abcdef*
Rule : Matched $element: abcdef*. Exiting loop.
Aaron