View Single Post
Old 09-13-2024, 02:00 AM   #4
Capricorn
Belgian Pommes Frites
Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.Capricorn turned on, tuned in, and dropped out.
 
Posts: 122
Karma: 35038
Join Date: Jan 2012
Device: Pocketbook Touch HD
Hmmmm.....I am confused now. I did a little test:
I put this regex into the regex101 machine, using PCRE2: <span>([^<>]*)</span>
Regex101 then tells me there is a mistake and I need to change it to:
<span>([^<>]*)<\/span> notice the backslash in the closing span

However, when I use <span>([^<>]*)</span> - without the backslash, in Sigil v2.3.1 (running on win11 pro, build 22631.4169), it works perfectly. Hence, my question: Is the regex of Sigil a variant of PCRE2 or...?
As I am not an expert on regex, but still like to use it, I am trying to understand what is going on.

And on this page https://sigil-ebook.com/sigil/ it says it uses PCRE

And when I use python on regex101 instead of PCRE or PCRE2, it does not need a backslash either.

Hmm.....yes, definitely confusing............

Last edited by Capricorn; 09-13-2024 at 02:27 AM.
Capricorn is offline   Reply With Quote