Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/19.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex reg表达式从数据中检索值_Regex_Postgresql - Fatal编程技术网

Regex reg表达式从数据中检索值

Regex reg表达式从数据中检索值,regex,postgresql,Regex,Postgresql,在postgres环境中,计算以下字符串值的正则表达式是什么: "((x.y.z == "test") OR (a.b.c intersects "test1") OR OR (pub.custom.channel intersects "test2,test3"))" 需要输出为:test、test1、test2、test3 regexp_replace(subject, '(?:\A[^"]*)?"([^"]+)"[^"]+(?:"([^"]+)"[^"]*\Z)?', '\1,\2',

在postgres环境中,计算以下字符串值的正则表达式是什么:

"((x.y.z == "test") OR (a.b.c intersects "test1") OR  OR (pub.custom.channel intersects "test2,test3"))"
需要输出为:test、test1、test2、test3

regexp_replace(subject, '(?:\A[^"]*)?"([^"]+)"[^"]+(?:"([^"]+)"[^"]*\Z)?', '\1,\2', 'g')

用什么语言/环境/工具?谢谢,这正是我所期望的。