从另一个系统迁移网站后,我有一些文本需要在单词之间换行。
例如,我想要更改:
ish.nArchipelago进入:
ish.
Archipelago我目前正在使用以下查询:
UPDATE wp_posts
SET post_content = REPLACE(post_content, 'ish.nArchipelago', 'ish.\nArchipelago');这是正确的吗?
发布于 2018-07-30 20:13:56
要替换每次出现的
<word>.n<word>使用
<word>.
<word>使用
REGEXP_REPLACE(string, '\.n', '\.\n');您的查询将是:
UPDATE wp_posts
SET post_content = REGEXP_REPLACE(post_content, '\.n', '\.\n');https://stackoverflow.com/questions/51591131
复制相似问题