View Single Post
Old 10-16-2010, 09:46 AM   #1
smartmart
Junior Member
smartmart began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2010
Device: Kindle
Regular Expression Help

Hi, i've converted a pdf to awz with the Amazon service, now i want convert it to mobi with Calibre (so i can add metadata and TOC).

I've a problem with chapter recognition, every chapter start with "Chapter XXX." so my regex is:
//*[re:test(., "chapter", "i")]

It works with the original pdf but not with the awz.
it matchs the word "chapter" in the text (sometimes there is the word "chapter" in the script) but it doesn't match the real chapters.

So i've saved the debug and i've seen that the chapters are not in a html tag (the text anyway is child of the body tag ofcourse):
<p> foo foo foo</p>CHAPTER 1<p> foo foo foo </p>

Is this the problem?
How can i fix it?

Thx
smartmart is offline   Reply With Quote