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
sourcestring: The text to look in; na gives na.regexstring: A regular expression in JavaScript syntax, as a string; na gives na.
Example
str.match("CLZ6", "[A-Z]+[0-9]") // "CLZ6"