数据仓库服务 GAUSSDB(DWS)-字符处理函数和操作符:regexp_substr(source_char, pattern)

时间:2024-04-18 16:25:14

regexp_substr(source_char, pattern)

描述:正则表达式的抽取子串函数。

返回值类型:varchar

示例:

1
2
3
4
5
SELECT regexp_substr('500 Hello World, Redwood Shores, CA', ',[^,]+,') "REGEXPR_SUBSTR";
  REGEXPR_SUBSTR   
-------------------
 , Redwood Shores,
(1 row)
support.huaweicloud.com/sqlreference-830-dws/dws_06_0030.html