1

I'm looking to strip some html from an img area with Low replace. This works great, but I have varying heights and widths to deal with.

So:

{exp:low_replace find="height=QUOTE365QUOTE|width=QUOTE500QUOTE" replace="SPACE" multiple="yes"}

ideally wants to be

{exp:low_replace find="height=QUOTE___QUOTE|width=QUOTE___QUOTE" replace="SPACE" multiple="yes"}

what should I put in the _ bit for any number value? Possible?

1 Answer 1

2

You, my friend, need to learn the ways of Regular Expressions. Try this:

{exp:low_replace
    find="(height|width)=QUOTE\d+QUOTE"
    replace="SPACE"
    regex="yes"
}
2
  • I knew it would have something to do with Regular Expressions (file with htaccess and Terminal.app voodoo)! You, are to clever. Thank you. It works! Jun 3, 2013 at 15:04
  • Cool. Can you mark the answer as accepted, then? Ta.
    – Low
    Jun 4, 2013 at 7:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.