View Single Post
Old 04-08-2012, 04:40 AM   #2
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,977
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
Your problem is with the name() elements, which only find h1 and h2 tags.

In my experience, searching for chapter alone often returns false positives but try one of:
Code:
//*[re:test(., '^chapter ', 'i')]
//h:p[re:test(., '^chapter ', 'i')]
//*[re:test(., 'Chapter [1-9]')]
The "*" means search everything and often leads to multiple hits on the same chapter, if so try the "h<semicolon>p" version which limits the search to <p> elements (or something like that). The "^" means match the start of a line and [1-9] means a character between 1 and 9. Remove the ", 'i'" to not ignore case (exact match of the string elements).

Last edited by wallcraft; 04-08-2012 at 04:51 AM.
wallcraft is offline   Reply With Quote