This is an old revision of the document!


remove extra attributes to p:

<p[^>]+>

remove span tags:

<[/]?span[^>]*>

To h4:

<p[^>]*><strong>([^<]+)</strong></p>
<p[^>]*><b>([^<]+)</b></p>

Replace with:

<h4>\1</h4>

Remove empty p tags:

<p[^>]*>&nbsp;</p>

Handling footnotes:

<a (href="#_ftn[0-9]") (name="_ftnref[0-9]") title=""></a>(\[[0-9]\])
<a (href="#_ftnref[0-9]") (name="_ftn[0-9]") title=""></a>(\[[0-9]\])
<a \2 /><a \1>\3</a>
<code>
<sup><a name="_ftnref\1" /><a href="#_ftn\1">\1</a></sup>
<a name="_ftn\1" /><a href="#_ftnref\1">\1</a>
<sup><a class="sdendnoteanc" (name="sdendnote[0-9]anc") (href="#sdendnote[0-9]sym")></a><sup>([a-z]*)</sup></sup>
<sup><a \1 /><a \2>\3</a></sup>
([\.”!])[ ]*([0-9]{1,2})([ <])
\1<sup><a name="_ftnref\2" /><a href="#_ftn\2">\2</a></sup>\3

Finding and replacing double quotation:

(?<!\=)"((?!"|'')[^"\n>]*)("|'')(?!>)(\W)
“\1”\3
<p>"([^"\n]+)</p>
<p>“\1</p>
(?<!\=)'((?!')[^'\n>]*)(')(?!>)(\W)
‘\1’\3