Replacing bad HTML
Posted: Thu Jan 25, 2007 4:04 am
I have a number of html pages converted from Word that have variations of bad paragraph endings peppered throughout that affect the space between paragraphs:
<br>
<br>
which should be replaced with
<p>
An exact match works, of course, but I don't trust the exact layout of this example to be universal, so I want to code an inclusive search between any pair of <br> tags ignoring whitespace with oneormore forced spaces (' ')
I've tried a number of EZ Pattern variations but am stumped and my trial runs always miss the pattern.
Here is the trial data:
<p>That means that from this great State of Michigan we want that part of the leadership. After all, you have the Senator who is the head of the Republican Policy Committee in the Senate body. By all means you must send him back and support him with the big delegation that you are capable of sending.<br>
<br>
You have nominated great State and national tickets, your Governor,<br>
your Senators, your Congressmen, your State officers.<br>
<br>
Thanx in Advance. Textpipe is a miracle worker!
<br>
<br>
which should be replaced with
<p>
An exact match works, of course, but I don't trust the exact layout of this example to be universal, so I want to code an inclusive search between any pair of <br> tags ignoring whitespace with oneormore forced spaces (' ')
I've tried a number of EZ Pattern variations but am stumped and my trial runs always miss the pattern.
Here is the trial data:
<p>That means that from this great State of Michigan we want that part of the leadership. After all, you have the Senator who is the head of the Republican Policy Committee in the Senate body. By all means you must send him back and support him with the big delegation that you are capable of sending.<br>
<br>
You have nominated great State and national tickets, your Governor,<br>
your Senators, your Congressmen, your State officers.<br>
<br>
Thanx in Advance. Textpipe is a miracle worker!