REGEX_EXTRACT - String
Matches all regexp
in str
and returns them.
Details
Note: “\” have to be escaped in JODA strings
Input parameters
Name | Type | Optional | Description |
---|---|---|---|
str |
String | False | String to match |
regexp |
String | False | Regular expression |
Output
Array[String]: A list of all matches
Usage
REGEX_EXTRACT(<str>, <regexp>)
Examples
Example 1
Query
LOAD tmp
AS ('': REGEX_EXTRACT("Number: 345345 Other: 2343", "(\\d+)"))
Result
["345345","2343"]