Skip to main content

Match

The match function is used to search for and extract occurrences of a specific pattern within a string. It scans the provided text and returns an array of the matched results, with the option to filter out the full string match and keep only the captured groups.

Reference

Parameters​

text​

(String): The target string where the search will be performed.

Component data2-core-primitives@String

pattern​

(RegExp): The regular expression defining the search criteria and capture groups.

Component data2-core-types@Regex

excludesInput​

(Boolean): Optional. If set to true, it prevents the full original text match from being included in the returned array, returning only the specific capture groups.

Component data2-core-primitives@Boolean