Support » Plugin: Search Regex » Remove div tags from post content

  • Hi,
    I’ve been trying a lot of regex patterns to remove div tags from my post contents, which have been migrated from my old yii installation and now are causing me a lot of trouble, but none seem to work.
    I want to remove only the tags and all it’s attributes (both opening and closing), without affecting the contents of the divs. How can it be done using your plugin? Please help!

    I’ve tried:

    • /<div[^>]*>/
    • #<div\b[^>]*>#
    • /<\s*div.*?>/

    The last one worked when I searched using SQl, but it doesn’t work with the plugin. What is the correct regex pattern to use?

  • The topic ‘Remove div tags from post content’ is closed to new replies.