0

I need to replace any div and any term inside div on my code.

in PHP is like this:

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

But in Mysql i have this structure to replace words:

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

thanks guys.

1 Answers1

3

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

Joaquín L. Robles
  • 6,261
  • 10
  • 66
  • 96