str.match

The first part of source that matches the regular expression regex (JavaScript syntax), or "" when nothing matches. A bad expression is a runtime error.

str.match(source: string, regex: string) -> string

Parameters

Example

str.match("CLZ6", "[A-Z]+[0-9]") // "CLZ6"