View Single Post
Old 03-02-2017, 06:12 AM   #63
Rob557
Zealot
Rob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-booksRob557 has learned how to read e-books
 
Posts: 108
Karma: 810
Join Date: Jul 2012
Device: Kobo
Quote:
Originally Posted by kovidgoyal View Post
Simply change the surrounding quotes from " to ' then you can include " inside
Good idea, however I'm not sure why, but that alternative approach does not seem to work either.

I tried to modify the second set of coding noted earlier (which otherwise runs okay) by replacing one of the occurrences of [\.\!\?] with ['"'\.\!\?], where the three inserted characters are a double quote surrounded by single quotes, but that change resulted in an error message that the xpath expression was invalid.

Similarly, in the first (simpler) set of coding I tried replacing [a-z] with [a-z'"'] but the same error message results as when I try using " or \" or """ or "" .

If the usual "escape" approaches don't work, a guess would be that maybe the Edit ToC xpath process itself currently assumes that double quotes are used exclusively for the purpose of demarcating the start and end of the RegEx expression, and the occurrence of a double quote anywhere within the RegEx expression is considered invalid ?
Rob557 is offline   Reply With Quote