The following HTML does not have closing </dt> tags for each matching opening <dt> tag which is missing now.
For Example <DT><A HREF="http://go.microsoft.com/fwlink/?LinkId=68924" ADD_DATE="1389093133">MSN Entertainment</A> (closing </dt> is missing here).
So, I decided to add the closing tag using regex. I am able to write the pattern for the finding a non-closed <dt> tag like
regEx pattern for finding the not closed <dt> tags:
<DT><A HREF=".*</A>
Regex code to replace what i find using the previous pattern with closing </dt> tag
<DT><A HREF=".*</A></DT>
But I got result as this string <DT><A HREF=".*</A></DT>, instead of just adding the closing <dt> tag I got this string everywhere I found the pattern.
Want to add the </dt> tag at the end of the pattern I found, either in IDE or via javascript is OK for me.
HTML file:
<DL>
<DT><H3 ADD_DATE="1389093133" LAST_MODIFIED="1423897474">Links for United States</H3>
<DL>
<DT><A HREF="http://go.microsoft.com/fwlink/?LinkId=129792" ADD_DATE="1389093133">GobiernoUSA.gov</A>
<DT><A HREF="http://go.microsoft.com/fwlink/?LinkId=129791" ADD_DATE="1389093133">USA.gov</A>
</DL>
<DT><H3 ADD_DATE="1389093133" LAST_MODIFIED="1423897474">MSN Websites</H3>
<DL><p>
<DT><A HREF="http://go.microsoft.com/fwlink/?LinkId=55143" ADD_DATE="1389093133">MSN Autos</A>
<DT><A HREF="http://go.microsoft.com/fwlink/?LinkId=68924" ADD_DATE="1389093133">MSN Entertainment</A>
<DT><A HREF="http://go.microsoft.com/fwlink/?LinkId=68923" ADD_DATE="1389093133">MSN Money</A>
<DT><A HREF="http://go.microsoft.com/fwlink/?LinkId=68921" ADD_DATE="1389093133">MSN Sports</A>
<DT><A HREF="http://go.microsoft.com/fwlink/?LinkId=54729" ADD_DATE="1389093133">MSN</A>
<DT><A HREF="http://go.microsoft.com/fwlink/?LinkId=68922" ADD_DATE="1389093133">MSNBC News</A>
</DL>
</DL>