View Single Post
Old 01-19-2011, 10:39 AM   #2
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 2,986
Karma: 1285294
Join Date: Sep 2010
Device: Kobo aura HD, Kobo Arc, Kindle Fire HDX 8.9 , Kindle for PC
with the tidy ( brush icon) active, this will work
find <p Chapter
replace with <h2 Chapter
( so long as the word chapter does not also start a sentence anywhere - tidy will fix the trailing tag
this is safer - find replace set to regex + match case, all files - in code view
find <p Chapter ([\d+])</p>
replace <h2 Chapter \1 </h2>

the \d+ finds any number with 1 or more digits and the \1 in the replace syntax re-uses the value found in the find process.

if find replace complains that there are no matches, check very carefully for superfluous

whoops I see you wanted h3, not h2 - just amend the above examples

it is a good idea to click replace ( once) a few times to check that it is working, before running replace all.

variations of that syntax will fix up other types of chapter headings, but if you need to use a period ( a full stop) in regex you must place a backslash in front of it \.
cybmole is online now   Reply With Quote