I am parsing whole articles of text which contain HTML; this is where the problem lies. I want to replace quotes, but leave quotes in tags alone. If the following text is what I was parsing:
Code: Select all
<span class="strong">"Hello"</span> he said, "My name is someberry.".Code: Select all
"Hello"
"My name is someberry."Code: Select all
'#(?<!=)"(.*?)"(?!>)#i'Anyone have any ideas why, or a better expression I could use as an alternative?
P.S. I know this current expression as it is isn't fullproof, however it doesn't need to be.