Quote:
Originally Posted by wallcraft
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).
|
Thanks, I'll work on this.
I don't know what <p> elements means, because I don't what elements are.
Does that [1-9] apply to multiple following digits? Like Chapter 27 or Chapter 103?
No, I don't think I want to ignore case.