MATCH( )
Tests if a string matches a pattern. The pattern must use JavaScript regular expression syntax.
Syntax
MATCH(source, pattern)
Arguments
source
The string to evaluate.
pattern
The string pattern to match. You must enclose the pattern in quotation marks (" "). In JavaScript regular expression syntax, a pattern is enclosed within a pair of forward slash (/) characters. However, for this argument, the forward slash characters are optional. For example, the following values are equivalent:
"smith"
"/smith/"
You can use any special character supported by JavaScript regular expressions, such as the following:
*
A question mark (?) matches zero or one occurrence of the character previous to it. For example, "te?n" matches tn, ten, and often. It does not match teen or intern.
*
An asterisk (*) matches zero or any number of occurrences of the character precious to it. For example, "te*n" matches tn, ten, often, and teen. It does not match intern.
*
*
A caret (^) specifies that the pattern to look for is at the beginning of a string. For example, "^ten" matches ten, tennis, and tense. It does not match often or pretend.
*
An i character specifies a case-insensitive search. For example, "/smith/i" matches Smith, blacksmith, and Smithsonian. In this case, the pair of forward slashes is required.
To match a special character literally, precede the special character with two backslash (\\) characters. For example, to check if a string contains S*10, specify the following pattern:
"/S\\*10/"
Returns
True if the string matches the pattern; returns false otherwise.
Examples
The following example returns true for values in the ProductCode field that start with S18:
MATCH([ProductCode], "/^S18/")
The following example uses MATCH( ) to check if the values in the SKU field contain the letters EM followed by a number that ends with 99. If there is a match, display Discontinued; otherwise, display the SKU value.
IF(MATCH([SKU], "/EM.*99/"), "Discontinued", [SKU])

Additional Links:

Copyright Actuate Corporation 2012