regexp_extract(string, pattern)



Query

presto:default> SELECT regexp_extract('1a 2b 3c 6f', '[a-z]+') as regexp_pattern;

Result

 regexp_pattern 
---------------- 
       a

The query returns the first string matched by the expression.

apache_presto_sql_functions.htm
Advertisements