0

我需要在我的代码中替换 div 中的任何 div 和任何术语。

在 PHP 中是这样的:

$newbody = str_replace('<div(.*?)>','',$body);

但是在Mysql中我有这个结构来替换单词:

UPDATE `wp_posts` SET `post_content` = replace(post_content, '<div(.*?)>', '');# <- thats wrong

多谢你们。

4

1 回答 1

3

There's not such thing as MySQL replacement with regular expressions, but you could try this

于 2013-04-19T17:56:44.050 回答