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

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

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

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

返回值类型:text[]

示例:

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