string.matchRegEx

This function matches the input against a regular expression.

Syntax

string.matchRegEx(expression, str)

Arguments

Argument

Type

Description

expression

string

Regular expression against which the source string needs to be matched.

str

string

Source string

Returns

Type

Description

boolean

  • True: if the source string matches the regular expression
  • False: if the source string does not match the regular expression

Examples

The function string.matchRegEx("foo.*", "seafood") returns true.