View Single Post
Old 01-30-2013, 05:37 PM   #32
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,094
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Great news on the wrap/no wrap!
I suppose I could make a REALLY LONG saved group for the roman numerals....

I was inserting id's to match the heading text in a condensed format. "Ch_1" for "Chapter 1", "Pt_2" for "Part 2", etc. I thought that would provide a more intuitive meaning than a generic sequence number when I review links - especially in other files.

example:
original headings
<h2>Part 1</h2>
<h3>1</h3>
<h3>2</h3>
<h3>3</h3>
<h2>Part 2</h2>
<h3>1</h3>
<h3>2</h3>
<h3>3</h3>
yadda, yadda

Replace Part headers: Find <h2>Part (.*?)</h2> Replace <h2 id="Pt_\1">Part \1</h2>
Replace Chapter headers: Find <h3>(.*?)</h3> Replace <h3 id="Ch_\1">\1</h3>

gives <h2 id="Pt_1">Part 1</h2> <h3 id="Ch_3">Chapter 3</h3>

This results in duplicate Chapter id's so I go to the beginning of each part and replace to the end (without wrap):
Find id="Ch_(.*?)"> Replace "Ch_1-\1">
/* which changes ALL the chapter headings but still have duplicates.

Then go to part 2
Find id="Ch_1-(.*?)"> Replace "Ch_2-\1">
/* which changes ALL the chapter remaining headings EXCEPT part 1

Then go to part 3
Find id="Ch_2-(.*?)"> Replace "Ch_3-\1">
/* which changes ALL the chapter remaining headings EXCEPT part 1 and part 2

etc, until the end of the file
Turtle91 is offline   Reply With Quote