Extract Regex Groups directive
The EXTRACT-REGEX-GROUPS
directive extracts the data from a regex group into its own column.
Syntax
extract-regex-groups :column 'regex'
The directive generates additional columns based on the specified regex
This ignores the $0
regex group.
Usage Notes
If multiple groups are matched, the directive creates multiple columns.
The base name of the column is appended with the match count and match position the pattern is matched for: <column>_<match-count>_<match-position>
.
Example
Using this record as an example:
{
"title": "Toy Story (1995)"
}
Applying this directive:
extract-regex-groups :title [^(]+\(([0-9]{4})\).*
results in this record:
The field title_1_1
follows the format of <column>_<match-count>_<match-position>
.
Created in 2020 by Google Inc.