我有以下数组作为记录:
[
"['Customer service', 'Ux/Ui']"
]
如何删除[]''
字符以只获取字符串Customer service, Ux/Ui
我使用了横向扁平,如下所示,但仍然返回与[]
select regexp_replace(value::varchar, '[[]'']', '') as label_cleaned
from t1,
lateral flatten(input => label)
发布于 2022-07-19 05:07:02
我想是关于失踪的逃逸角色:
with MyData as (
select ['[''Customer service'', ''Ux/Ui'']'] as label )
select regexp_replace(value::varchar, '[\\[\\]'']', '') as label_cleaned
from MyData,
lateral flatten(input => label)
如您所见,我添加了反斜杠符号。
https://stackoverflow.com/questions/73036599
复制