Forum Moderators: coopster
I have a system that does what I want. I can replace tags while leaving the inside text alone. THe trouble arises when I try to replace tags that are surrounding other tags. This is because my expression does not allow other brackets to be part of the wildcard.
IE. My current expression is
#<strong>([^<]+)</strong>#
which would work if the string is
<strong>Hello world</strong>
but not when the string is
<strong><em>Hello world</em></strong>.
How can I add text so that the expression allows other tags to pass through, but stop at the closing tag?