REGEXP_EXTRACT
Description
The REGEXP_EXTRACT function extracts matching text from the input string (str) using the specified regular expression (regexp). This function uses the re2 regular expression engine for matching.
Parameter Description
- str (string): The input string to be matched.
- regexp (string): The regular expression string used for matching.
- idx (int, optional): The index of the group to extract. Indexing starts from 1, with the default value being 1, which means extracting the first group. If the specified value is 0, it means matching the entire regular expression.
Return Value
Returns a string containing the matched text.