【发布时间】:2022-11-02 19:02:49
【问题描述】:
my_Query -
SELECT (regexp_matches('datavalue=Document{{value=[5]}}', 'datavalue=Document{{value=([^d}},'']+)'))[1] response;
当前输出是方括号 - [5]
我需要没有方括号 - 5
【问题讨论】:
my_Query -
SELECT (regexp_matches('datavalue=Document{{value=[5]}}', 'datavalue=Document{{value=([^d}},'']+)'))[1] response;
当前输出是方括号 - [5]
我需要没有方括号 - 5
【问题讨论】:
要基于正则表达式提取字符串的一部分,substring() 是更好的选择:
substring('datavalue=Document{{value=[5]}}' from 'datavalue=Document{{value=[([0-9]+)]}}') response;
【讨论】: