Quote:
Originally Posted by DaleDe
I was cleaning up a book that started out as nearly pure text and was taking advantage of tidy.
Here is some of my experiences: I found a way to identify some text so that I could change an entire book with find and replace:
I made a span around some leading text and tidy make the /span at the end of the paragraph. I made a /span where I really needed it and tidy removed the one it built. Note that the first time I tried to put the /span in first but tidy removed it. the order is important.
Later I need to change certain paragraphs (chapters) to h3 so they would go in the TOC. I searched and replaced <p>Chapter ... with <h3>Chapter ... and expected tidy to fix the /h3 which it did. However, in a retro work around design dating back to html version 3 before css it also decided to add spacing so my file now looks like:
<h3>Chapter text<br />
<br /></h3>
Stupid tidy, a bug that needs fixing. However, now I have all these extra breaks. I am no expert on using regular expressions and this one has to cross a CR/LF sequence on my PC. How can a code the find to find and select both breaks?
Dale
|
I may be off base, but the following should work (it works in epp

)
Find:
Code:
<h3>([^~]+?)<br />
<br /></h3>
Replace: