Skip to main content

$regex

The $regex operator checks if the first string matches the regular expression pattern provided in the second string.

Input

  • An array containing exactly two string values: the input string and the regex pattern

Output

  • true if the first string matches the regex pattern
  • false otherwise

Examples

Matching Pattern

Result: true

Non-matching Pattern

Result: false

Field Value

Result: true if the phone_number field matches the international phone number pattern, otherwise false