Dec 7, 2009, 8:39 PM
Post #1 of 1
I have a regex that is designed to help improve readability for a html document.
Regex, HTML string modification
The purpose of this regex is to escape " marks from within <EM> affected sentences. Example:
Before: <P>This "is" <EM>a <STRONG>"Test"</STRONG></EM></P>
After: <P>This "is" <EM>a <STRONG></EM>"<EM>Test</EM>"<EM></STRONG></EM></P>
Note the regex only affects " inside of <EM> elements. My problem is that i need to modify the regex to account for " inside of tags. <EM CLASS="a1"> or <STRONG CLASS="a1"> etc.
With the current regex those " marks will be modified. Any help in stopping that from happening would be appreciated.