regexp_extract(string, pattern, group)



Query

presto:default> SELECT regexp_extract('1a 2b 3c 6f', '(\d+)', 1) as regexp; 

Result

 regexp 
-------- 
   1

The query returns the first digit matched by the expression with one group.

apache_presto_sql_functions.htm
Advertisements