2
1
0
1 answer
- 210
the
regex:XYZ
idiom in opevents' advanced search dialog refers to MongoDB's regex query operator, which supports perl-compatible regexps (aka PCRE - see this link for introduction to regular expressions).your use of
'[]
' is misbehaving as it's meant for character classes. the 'regex:([worker])
' happens to work more or less because it checks for 'an occurrence of any of the characters w, o, r, k, e or r anywhere'.i'd suggest something like '
regex:^worker-\d{2}-'
if your node numbers are 0-padded, or'regex:^worker-\d{1,2}-
' if you have both "worker-4-something" and "worker-11-otherthing".Add your comment...
In opEvents, per Advanced, the search per regex is possible, on the bottom is noted:
*use "regex:[regular expression] for advanced filtering".
Now, I have here nodes, called worker[01-15]-*. I used the following regex:
regex: "([worker])" => shows all entries for all nodes in the selected time period
"([worker])" => no data to display
"^[worker]*$" => no data to display
Any tips?
thanks
--alex