View Single Post
Old 06-26-2015, 03:32 AM   #6
lealla
Enthusiast
lealla will become famous soon enoughlealla will become famous soon enoughlealla will become famous soon enoughlealla will become famous soon enoughlealla will become famous soon enoughlealla will become famous soon enoughlealla will become famous soon enough
 
lealla's Avatar
 
Posts: 39
Karma: 714
Join Date: Jun 2015
Device: Kobo Aura H2O
Quote:
Originally Posted by gbm View Post
Try this:
Code:
//*[((name()='p' ) and re:test(., 'chapter|book|section|part|prologue|epilogue\s+', 'i')) or @class = 'chapter']

bernie
Thanks bernie!

That worked a little bit, in that it did split the document, but it didn't only split it on the word chapter.
There are 19 chapters, but I ended up with 90 html files.
I couldn't see any reoccurring themes - i.e. they all were split on different words, none that were a part of the code. It split on words such as "The" "She" "It". It did also split on the word Chapter though.

As far as code goes, all the tags preceding the words are the same: </p><p class="calibre2">

Thanks to theducks advice, I deleted the calibre configuration folder before I started, but this didn't seem to make much difference either way (but was a good tip nonetheless.)

Just to confirm, yes this is within the Calibre Edit Book area, I'm right clicking within the code area and selecting "Split at multiple locations" and then pasting the code into the dialogue box that pops up.

Thank you for taking the time to help, I really appreciate it. I'm not too crash hot at all this, but I'm learning loads as I go.

Last edited by lealla; 06-26-2015 at 04:02 AM.
lealla is offline   Reply With Quote