Related Articles
Characters
There are 5 special characters in Special String Matching:
Character | Meaning | Example | Matches |
% | Any amount of any characters including no characters at all. | Pre% | Any string starting with Pre followed by anything or nothing at all: "Pre", "Preceded" |
_ | Exactly one of any character. | Pre_ | Any string containing Pre followed by exactly one of any character: "Pred" |
- | Negation. | -food | Any string that isn't "food". |
, | Multiple criteria separator. Multiple rules can be added together using commas. Each must match individually for the whole pattern to match. | -%food%,%foo% | Any string that contains "foo", but not "food". |
^ | Escape character. The next special character should be used literally. | ^% | Match the actual character % exactly. |
All other characters are matched case insensitively so "a" is the same as "A".
Examples
Pattern | Possible Matches (not necessarily all) | Does NOT Match |
abc | abc | xyz |
abc% |
abc abcd abc123 |
1abc bacba abbc |
%abc |
abc 123abc aabc |
abc1 bacba abbc |
%abc% |
abc 123abc abc123 i like this abc stuff |
abbc ab123c
|
abc_ |
abcd abc! |
abdc abcde abc |
_abc |
1abc 2abc habc |
abc abcd 11abc |
^% | % | a |
^_ | _ | b |
^, | , | c |
%abc%,-%abcd% |
abc abce |
abcd bce |
If you wish to use OR logic, simply add multiple rows to the appropriate table. So for example if you want to match something containing "dog" OR "cat" then you need two separate rules leading to the same thing:
%dog%
%cat%
Comments
0 comments
Please sign in to leave a comment.