Thread: Regex examples
View Single Post
Old 02-05-2012, 08:32 PM   #3
JeremyR
Guru
JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.JeremyR ought to be getting tired of karma fortunes by now.
 
JeremyR's Avatar
 
Posts: 969
Karma: 2458216
Join Date: Aug 2010
Location: St. Louis
Device: Kindle Keyboard, Nook HD+
This one uses the old format of Sigil Regex, but I find it very useful. Basically I use it to take a document that was text and thus not broken up into chapters but with them labeled, and to find them, highlight them and add the break marks

For books with Chapter I, Chapter II, and so on (Roman Numerals) or with Chapter 1, Chapter 2. (And of course, use it in code view)

Search for

CHAPTER [0-9XVI]+

And replace with

<hr class="sigilChapterBreak" /><h3>\0</h3>

On occasion it will find a phrase like "chapter in" in the text, but that's pretty rare (and just check the TOC before having it split)

Last edited by JeremyR; 02-05-2012 at 08:36 PM.
JeremyR is offline   Reply With Quote