•
|
Then, you use Pat Match to compare a string to the pattern.
|
•
|
Pat Match returns True (1) if the pattern is found in the string, or it returns False (0) if the pattern was not found in the string.
|
•
|
To use regular expressions instead of patterns, use Regex Match.
|
Constructs patterns that match the null string if the current position is int from the left end of the string, and fail otherwise.
Constructs patterns that match the null string if the current position is int from the right end of the string, and fails otherwise.
Constructs a pattern that matches forward to position int in the source string. It can match 0 or more characters. It fails if it would have to move backwards or beyond the end of the string.
Constructs a pattern that succeeds and matches the null string if expr is not zero and fails otherwise.
Constructs a pattern that matches the null string and stores the current position in the source string into the specified JSL variable (varName). The assignment is immediate, and the variable can be used with expr() to affect the remainder of the match.
Saves the result of the pattern match to a variable named as the second argument (varName) immediately.
Pat Match returns true or false rather than a string, so Pat Match is somewhat difficult to use in a formula. You might find the Regex function (Regex) easier to use when you are adding pattern-matching formulas in the Formula Editor.
A simpler function, Regex (Regex), is also available. Regex returns a string value rather than a list, so Regex is usually easier to use in the Formula Editor than RegEx Match.