Hi, I'm new to this board and fairly new to Regular Expressions. I have used every combination of words in the Forum search feature, but have not found a solution for this.
I'm trying to get rid of spaces in anchors, refs and ids in files that I am trying to convert to XHTML from old HTML files that were generated by an ancient MS WYSIWYG application that generates lots of bad code. I have cleaned up 90% of it but I'm stuck with this problem:
I would like to be able to take out all the spaces (and special characters) from the href, name and id tags, to that they can at least yield valid XHTML 1.0. If there is a way in Ultraedit to do this, I'd love to hear of it. I've looked at all the regex pages that I can find to no avail.
As you'll note in the code above, there is sometimes an "id", sometimes not, my hair is falling out.
I have thousands and thousands of these to clean up and I'm chasing my tail right now it seems.
Thanks.
I'm using UE 14.10.0.1018 and am trying to use Perl RegEx.
I'm trying to get rid of spaces in anchors, refs and ids in files that I am trying to convert to XHTML from old HTML files that were generated by an ancient MS WYSIWYG application that generates lots of bad code. I have cleaned up 90% of it but I'm stuck with this problem:
Code: Select all
<ul>
<li><a href="#three word title">three word title </a></li>
<li><a href="#four word title?">four word title?</a> </li>
<li><a href="#5 word title (and some words in brackets 0r parentheses)">5 word title (and some words in brackets 0r parentheses)</a> </li>
</ul>
<p>A bunch of text here. </p>
<h2><a name="three word title"></a>three word title
</h2>
<p>Another paragraph of text</p>
<h2><a name="four word title?"></a>four word title?</h2>
<p>Another paragraph of text</p>
<h2><a name="5 word title (and some words in brackets 0r parentheses)" id="5 word title (and some words in brackets 0r parentheses)"></a>5 word title (and some words in brackets 0r parentheses)</h2>
<p>Another paragraph of text and some tables.</p>
As you'll note in the code above, there is sometimes an "id", sometimes not, my hair is falling out.
I have thousands and thousands of these to clean up and I'm chasing my tail right now it seems.
Thanks.
I'm using UE 14.10.0.1018 and am trying to use Perl RegEx.