Quote:
Originally Posted by kovidgoyal
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 ?