regexmatchexact
TEXT
regexmatchexact
PATTERN

The regexmatchexact operator checks to see if the text on the left matches the regular expression on the right (see Regular Expressions).

Parameters

This operator has two parameters:

text – The text you want to match.

pattern – The regular expression.

Description

This operator checks to see if the text on the left matches the regular expression on the right (see Regular Expressions). The regexmatchexact operator is case sensitive (it recognizes the difference between upper and lower case letters) – if you want a case insensitive match use the regexmatch operator.

Entire books have been written about regular expressions (see Regular Expressions for recommendations), and you’ll probably want to read one or more of these books to get the maximum benefit from this powerful tool. Here are some very simple examples.

Does text contain a number?

         "Deadline is in 34 days" regexmatchexact "[0-9]+" ☞ TRUE
          "Deadline is Friday" regexmatchexact "[0-9]+" ☞ FALSE

Does text contain any upper case letters?

          "Bob Smith" regexmatchexact "[A-Z]" ☞ TRUE
          "mary wilson" regexmatchexact "[A-Z]" ☞ FALSE

Is the text a valid upper case e-mail address (valid format, at least)? (Of course e-mail addresses can usually contain lower case characters, but for the purpose of this example we’re assuming only upper case letters are valid.)

          "JOE@BOB.COM" regexmatchexact "^[A-Z0-9!#$%&'*+/=?`{|}~^.-]+@[A-Z0-9.-]+$" ☞ TRUE
          "joe@bob.com" regexmatchexact "^[A-Z0-9!#$%&'*+/=?`{|}~^.-]+@[A-Z0-9.-]+$" ☞ FALSE

The final example gives you a taste of what Regular Expressions are capable of.

Error Messages

RegexMatchExact operands cannot be numeric. – You’ll see this message if either of the operands contains a numeric value.

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.
- 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).
- 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 | New | Regular expression support is new in this version