RegexpMatch
Last updated
Was this helpful?
Last updated
Was this helpful?
Returns True if a string matches a regular expression.
RegexpMatch(string, pattern)
stringRequiredThe string to search.patternRequiredThe pattern to match within the subject.
πWhen the regular expression you want to use contains a slash, quotation or other special character, you will need to use a backslash (\) to escape the special character. Regexp can vary based on the databases. Check the documentation of the database you use to find the correct syntax.
Example 1:
Check if a name starts with an uppercase letter, followed by one or more lowercase letters, and then has another uppercase letter followed by one or more lowercase letters.
Example 2:
Check if a string matches the social security pattern 'xxx-xx-xxxx'
Returns true.
Example 3:
Check if a string matches the phone number pattern '(xxx) xxx-xxxx'
Example 4:
Check if an address starts with a numeric characters.