We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Find and Replace plugin - need regex help!

Development and Programming

brittanyA's avatar
brittanyA
184 posts
16 years ago
brittanyA's avatar brittanyA

I’ve installed Low’s find and replace plugin and experienced success in removing divs with images and captions. I recently added a new parameter to the regex and, for some reason, it won’t take. Here’s my code:

{exp:html_strip keep="strong,em,p,h2,ul,ol,li,a,div"}{exp:replace find="<div class=QUOTEimagerightQUOTE.*?div>|<div class=QUOTEimagecenterQUOTE.*?div>|<div class=QUOTEimageleftQUOTE.*?div>|<div class=QUOTEarticlesideQUOTE.*?div>" replace="" regex="yes" multiple="yes"}{article_body}{/exp:replace}{/exp:html_strip}

It is the “articleside” div that refuses to be removed. Inside that div are p, h2, and ul tags, but I don’t see how that makes a difference. I’ve tried removing the html_strip plugin as well as putting it inside the exp:replace, but neither have produced any difference.

Any ideas?? Thank you so much!

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.