数据仓库服务 GaussDB(DWS)-字符处理函数和操作符:regexp_split_to_array(string text, pattern text [, flags text ])

时间:2025-01-26 10:51:40

regexp_split_to_array(string text, pattern text [, flags text ])

描述:用POSIX正则表达式作为分隔符,分隔string。和regexp_split_to_table相同,不过regexp_split_to_array会把它的结果以一个text数组的形式返回。

返回值类型:text[]

示例:

12345
SELECT regexp_split_to_array('hello world', E'\\s+'); regexp_split_to_array----------------------- {hello,world}(1 row)
support.huaweicloud.com/sqlreference-dws/dws_06_0030.html
推荐文章