notmatch
TEXT
notmatch
PATTERN

The notmatch operator checks to see if the text on the left does not match the wildcard pattern specified on the right.

Parameters

This operator has two parameters:

text – The text you want to match.

pattern – The wildcard pattern.

Description

The notmatch operator is the opposite of the match operator. Notmatch checks to see if the text on the left matches the wildcard pattern specified on the right, and returns false if it does. This operator is similar to the notcontains operator except that the `?` and `*` characters have special meanings:

The `?` character will match any single character.

The `*` character will match any number of characters, or no characters.

Any other characters in the pattern must match a character in the text on the left. For example if the pattern contains an `x`, the text on the left must contain an `x` in the same spot (actually either lower case `x` or upper case `X` is fine, since the notmatch operator is not case sensitive. If you want a case sensitive version of this operator use the notmatchexact operator.

Here are some examples:

    "Jim Johnson" notmatch "j*johnson" ☞ false
    "Jack Johnson" notmatch "j*johnson" ☞ false
    "Bill Johnson" notmatch "j*johnson" ☞ true
    "JJohnson" notmatch "j*johnson" ☞ false
    "J346 Ujohnson" notmatch "j*johnson" ☞ false
    "J@#opcjohnson" notmatch "j*johnson" ☞ false
    "92685" notmatch "926??" ☞ false
    "92685-1000" notmatch "926??" ☞ true
    "9268" notmatch "926??" ☞ true
    "(714) 555-1212" notmatch "(???) ???-????" ☞ false
    "714-555-1212" notmatch "(???) ???-????" ☞ true

The notmatch function only has two special characters, making it easy to use but rather limited. For a much more powerful (and much more complicated) pattern matching operator see regexmatch, which uses Regular Expressions instead of simple wildcards.

See Also

- like -- checks to see if the text on the left matches the wildcard pattern specified on the right.
- match -- checks to see if the text on the left matches the wildcard pattern specified on the right.
- matchexact -- checks to see if the text on the left matches the wildcard pattern specified on the right.
- notmatchexact -- checks to see if the text on the left doesn't match the wildcard pattern specified on the right.
- regexarray( -- applies a regular expression to a text value, then builds an array containing all of the substrings that match the regular expression (see Regular Expressions).
- regexarrayexact( -- applies a regular expression to a text value, then builds an array containing all of the substrings that match the regular expression (see Regular Expressions).
- regexliteral( -- adds \ characters to text as necessary so that it can be used as a literal in a regular expression.
- regexmatch -- checks to see if the text on the left matches the regular expression on the right (see Regular Expressions).
- regexmatchexact -- checks to see if the text on the left matches the regular expression on the right (see Regular Expressions).
- regexreplace( -- replaces text with new text. The text to be replaced is determined by a regular expression.
- regexreplaceexact( -- replaces text with new text. The text to be replaced is determined by a regular expression.
- regexreplacefirst( -- replaces the first occurrence of a regular expression pattern with new text.
- regexreplacefirstexact( -- replaces the first occurrence of a regular expression pattern with new text.
- Regular Expressions -- Regular expressions can be used to look for a specified pattern in text and then specify what to do with each pattern match that is found

History

Version | Status | Notes
10.0 | Updated | Carried over from Panorama 6.0, but also now allows numeric as well as text parameters.