matchexact
TEXT
matchexact
PATTERN

The matchexact operator checks to see if the text on the left matches the wildcard pattern specified on the right.

Parameters

This operator has two parameters:

text – The text you want to match.

pattern – The regular expression.

Description

The matchexact operator checks to see if the text on the left matches the wildcard pattern specified on the right. This operator is similar to the contains 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. Unlike the match operator, matchexact is case sensitive so the pattern character must exactly match, including upper and lower case.

Here are some examples:

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

You can use the matchexact operator to create case sensitive versions of the contains, beginswith or endswith operators:

`A contains B` case sensitive version is `A matchexact "*"+B+"*"`

`A beginswith B` case sensitive version is `A matchexact B+"*"`

`A endswith B` case sensitive version is `A matchexact "*"+B`

The matchexact operator 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 regexmatchexact, 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.
- notmatch -- checks to see if the text on the left does not match 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.