REGEX()

REGEX()

Top  Previous  Next

 

The REGEX() function tests whether a string matches a regular expression. This function is not available on Windows systems.

 

 

Format

 

REGEX(str, regex{, modes})

 

where

 

stris the string to match against the regular expression.

 

regexis the regular expression.

 

modesare additive flags controlling how the regular expression is tested. At this release there is just one option:
REG$NOCASECase insensitive.

 

 

The REGEX() function provides limited support for regular expressions. It tests whether str matches regular expression regex, returning True if it does and False if it does not. The function also returns False if regex is incorrectly formed.

 

On ECS mode systems, the REGEX() function only works correctly for strings formed only from characters with codepoint values U+0000 to U+00FF.

 

For details of regular expressions, see one of the online tutorials.

 

 

See also:
Pattern matching