View Single Post
Old 05-18-2025, 05:06 AM   #16
philja
Addict
philja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enoughphilja will become famous soon enough
 
Posts: 270
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
I'm always interested in expanding my use of regex so I tried both Doitsu's test case and Kevin's test case and couldn't get either to work in Sigil 2.4.2 on my MacBook.

Doitsu's original Find
Code:
(?<!”\s\w+\s)said\. “
and

Kevin's variation :
Code:
(?<!”\s\w{1,6}\s)said\. “
both give 'Invalid Regex: offset:0' when I hover on them as does Kevin's other test case
Code:
(?<=0x{1,6})y
Presumably, these should work in 2.4.2 on Mac?

Edit:
I must be seriously missing something. I can't get any of these 3 regex Finds to work on my linux or W10 boxes either.

Hovering the cursor over the find term gives exactly the same message each time: 'Invalid Regex: offset:0' which doesn't help me at all.

I can get both
Code:
(?<!"\sJack\s)said\. "   and   (?<!"\s\w{4}\s)said\. "
to work with Diatsu's test epub ie it ignores his first line and finds the other two. But as soon as I mess around trying to use a range {1,6} or similar, the regex is described as invalid.

Last edited by philja; 05-18-2025 at 08:41 AM. Reason: further testing
philja is offline   Reply With Quote