Matches

Description

Checks if a string argument's value matches a specified regular expression. If the argument's value matches the regular expression, a true Boolean value is returned. If the argument's value does not match the regular expression, a false Boolean value is returned. A new column is created for the results.

Use

  • Argument:
    • Select an argument. (String) 
  • Regex:
    • Enter a regular expression to search for in the argument's value.
  • Output field name:
    • Enter an output field name.

Example

Example string valueRegexMatches() returns
test@gmail.com(\W|^)[\w.\-]{0,25}@(gmail|hotmail)\.com(\W|$)true
test@hotmail.com(\W|^)[\w.\-]{0,25}@(gmail|hotmail)\.com(\W|$)true
test@yahoo.com(\W|^)[\w.\-]{0,25}@(gmail|hotmail)\.com(\W|$)false

Hero Platform_ Example

An example of this function can be found in Hero Platform_'s library of examples.

Download the example titled "function_Matches" to see an example of this function. 

Type

Formulas