【发布时间】:2019-01-10 13:35:17
【问题描述】:
我有这个字符串:
this is the abcd xxx
string I want to abcd yyy
replace in my text abcd zzz
现在我想用空白替换 abcd 及其后面的任何内容。
我想要这个结果:
this is the
string I want to
replace in my text
我试过了:
select regexp_replace(str, 'abcd.*','','gi')
但它只是在第一场比赛后删除了所有内容。还有其他没有运气的组合。
我错过了什么?
谢谢!
【问题讨论】:
标签: regex postgresql regexp-replace