Use of Wild Cards and Regular Expressions
While specifying hosts and paths in the package you may use so called Regular Expressions and Wildcards.
The supported patterns are as follows:
The patterns are fairly extensive, and approximate some of the ability
of Unix/grep "regular expression" patterns. Here are the available
tokens:
- ? - Matches a single character.
- # - Matches the following expression 0 or more times.
- (ab|cd) - Matches any one of the items seperated by '|'.
- ~ - Negates the following expression. It matches all strings
that do not match the expression (aka ~(foo) matches all
strings that are not exactly "foo").
- * - Synonym for "#?".
The following are not supported by the HostQSession class, but can be used with GetOp, SubscribeOp, GetAndSubscribeOp and MessageOp.
- [abc] - Character class: matches any of the characters in the class.
- [~bc] - Character class: matches any of the characters not in the class.
- a-z - Character range (only within character classes).
- % - Matches 0 characters always (useful in "(foo|bar|%)").
"Expression" in the above table means either a single character
(ex: "#?"), or an alternation (ex: "#(ab|cd|ef)"), or a character
class (ex: "#[a-zA-Z]").
|