Apache-presto-regexp-replace-function

提供:Dev Guides
移動先:案内検索

regexp_replace(文字列、パターン、置換)

問い合わせ

presto:default> SELECT regexp_replace('1a 2b 3c 6f', '(\d+)([abc]) ', 'aa$2 ')
as expression;

結果

 expression
----------------
 aaa aab aac 6f
 (1 row)

式に一致する文字列のインスタンスを、パターンと置換文字列「aa」に置き換えます。