Posting links to copyrighted content on these forums will get you banned, thats why I asked you to use the wizard and just post a few lines of html. Please don't do that again.
Anyway, here is the content I asked you for:
Code:
<div class="chapter" id="calibre_toc_9"></div><div class="calibre1"><h3 class="calibre6"><a name="ch05" class="calibre9" id="ch05">5</a> <br class="calibre3"/><br class="calibre3"/><br class="calibre3"/></h3></div><p class="fl1">My nagging got the better o
Note that using the 'tweak epub feature' to check out the code is not ideal, because you want to look at the content of the LIT file, not the epub file, that's why I asked you to use the wizard in Search and Replace. It's possible that Calibre may change the html in a way that you can't determine the solution to the problem at hand. Anyway in this case I think you're safe enough.
If you look at your chapter headers, you can see they're just numbers. When you look through the html code you can see these are referenced in '<h3>' heading tags:
Code:
<h3 class="calibre6"><a name="ch05" class="calibre9" id="ch05">5</a> <br class="calibre3"/><br class="calibre3"/><br class="calibre3"/></h3>
There is a box in the structure detection panel where you can configure an xpath to detect chapters, the default is this:
Code:
//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part\s+', 'i')) or @class = 'chapter']
Note that only looks for h1 or h2 tags, but in your case we need h3 tags. It also has a regex that looks for the words chapter, book, section, or part, but we need numbers, which can be represented as \d+
So we can just change that xpath to this:
Code:
//*[((name()='h1' or name()='h3') and re:test(., '\d+', 'i')) or @class = 'chapter']
And you should be good to go.
If all the chapter tags in the book are h3 tags, you could also click on the little magic wand icon next to the xpath, and just type 'h3' into the first box - even simpler.