需求

sql


set @title = '[闲聊灌水]现在程序员的工资多少了?';
set @want = '现在程序员的工资多少了?';
-- mysql
update threads set title = regexp_replace(title,'^[:space:]{0,}\\[.{4}\\][:space:]{0,}','')  where site='csdn';


-- mariadb
update threads set title = regexp_replace(title,'(\s)?\\[[^\\]]{4}\\]\s?','') where site = 'csdn';
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐