Formula Engine Reference Guide
 

 

Back to Class Index

 

REGEX(S1, S2)

Description
Returns True (1) if the string S2 matches the pattern specified by the regular expression in string S1, and False (0) otherwise. This function is similar to EXACT except it allows "wildcard" comparisons by interpreting S1 as a regular expression of the type used in the Find and Extract operations.
 
Parameters
S1

A string value
 
S2
A string value
 
Examples
REGEX("t.p", "top") = 1
 
REGEX("t.e", "table") = 1
 
REGEX("t.e", "talk") = 0
 
REGEX("F[0-9]", "F3") = 1
 
REGEX("F[0-9", "F3") = Error! Missing ]
 
REGEX("a", "apple") = 1
 
REGEX("ab", "apple") = 0