Regex matcher
Last updated
Last updated
[string/Regex matcher]
Matches a string to a non-global regular expression.
Keywords: string, regular expression, regex
string: string
Receives the string to be matched.
Example: "The quick brown fox jumps over the lazy dog. It barked."
regex: string
Receives the regular expression.
Example: "(?fox|cat) jumps over"
matches: boolean
Whether the given regex matches the given string; Example: true
matched: (string or null)
Sends the matched text. Example: "fox jumps over"
groups: string[]
Sends the capturing groups matched by the given regex pattern. Example:
named groups: {string: string}
Sends the named capturing groups matched by the given regex pattern. Keys are the names and values are the capturing group or null if no named capturing groups were defined. Example: