How to: |
The REGEX function matches a string to a regular expression and returns true (1) if it matches and false (0) if it does not match.
A regular expression is a sequence of special characters and literal characters that you can combine to form a search pattern.
Many references for regular expressions exist on the web.
REGEX(string, regular_expression)
where:
Alphanumeric
Is the character string to match.
Alphanumeric
Is a regular expression enclosed in single quotation marks constructed using literals and metacharacters. The following metacharacters are supported
For example, the regular expression '^Ste(v|ph)en$' matches values starting with Ste followed by either ph or v, and ending with en.
Note: The output value is numeric.
REGEX matches the FIRSTNAME field against the regular expression '^Sara(h?)$', which matches Sara or Sarah:
REGEX(FIRSTNAME,'^Sara(h?)$')
For Sara, the result is 1.
For Amber, the result is 0.
WebFOCUS | |
Feedback |