我有正则表达式的问题。regexp_replace POSTGRESQL
我想搜索的文字这样' A ' - (space, BIG SINGLE CHAR and SPACE)
SELECT regexp_replace(' A Text B Text C Text a Text', '(([ ]{1}[A-Z]{1,1}[ ]{1}))', ' \1 ', 'g')
所以一切正常,但我想,以取代小焦这个单一的大字符。
SELECT regexp_replace(' A Text B Text C Text a Text', '(([ ]{1}[A-Z]{1,1}[ ]{1}))', lower(' \1 '), 'g')
不工作。
如何使用功能在此匹配\1
,例如lower()
得到结果
a Text b Text c Text a Text
?
谢谢。
你能发布预期的输出吗? – nu11p01n73R 2014-10-30 11:59:57
'a Text b Text c Text a Text' 替换A B和C的小写 – lukasz 2014-10-30 12:02:39