![]() |
#16 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 237
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\. “ Kevin's variation : Code:
(?<!”\s\w{1,6}\s)said\. “ Code:
(?<=0x{1,6})y 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\. " Last edited by philja; 05-18-2025 at 08:41 AM. Reason: further testing |
![]() |
![]() |
![]() |
#17 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,616
Karma: 5703586
Join Date: Nov 2009
Device: many
|
Yes all 3 systems are using PCRE2 10.44 or earlier which have the bug. The next Sigil will use PCRE2 10.45.
On Linux, you should be easily able to update just the PCRE2 library to version 10.45 and Sigil 2.4.2 should work just fine with these tests then. |
![]() |
![]() |
![]() |
#18 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,509
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Can confirm that the Arch repo version of Sigil 2.4.2 doesn't have the bug--as it's built to use the system version of pcre2 (which is 10.45). If you build your own Sigil 2.4.2 with bundled libs (the default) the bug will manifest.
|
![]() |
![]() |
![]() |
#19 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 237
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Just checked in my UbuntuStudio 24.04.02 LTS and all pcre2 packages in the repo seem to be 10.42, so it looks like waiting for the next version of Sigil.
|
![]() |
![]() |
![]() |
#20 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,509
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
You built your own version of Sigil on 24.04, (I don't believe sigil 2.4.2 is available for 24.04), right? If so, there's no need to wait for anything. Just build Sigil from the latest GitHub master source and don't configure it to use the system libs. That way it will be built with the pcre2 10.45 now bundled with Sigil.
Ubuntu 24.04 won't likely be upgrading their version of pcre2, so you're going to need to remember to not use -DUSE_SYSTEM_LIBS=1 when configuring Sigil--whenever you build Sigil. |
![]() |
![]() |
![]() |
#21 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 411
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Just a pointless sidebar that was probably addressed 5 years ago with the release of 1.0, thank you for adding the Regex validation into the program, and making it sensitive not to external regex rules but to Sigil's compatibility. Otherwise we'd have been spinning our wheels a lot longer even after landing on nominally valid regex like:
Code:
(?<!”\s\w{1,6}\s)said\. “ |
![]() |
![]() |
![]() |
#22 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,706
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
|
|
![]() |
![]() |
![]() |
#23 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 237
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
The regex problem has now gone on my Linux box - (and I even remembered that testplugin has to used on Sigil's default empty file!!). Thanks for the push. |
|
![]() |
![]() |
![]() |
#24 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 237
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
|
|
![]() |
![]() |
![]() |
#25 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,509
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() For all intents and purposes, you now have what will be the upcoming Sigil 2.5.0 release. So unless something comes up this week, you won't need to rebuild after the upcoming release. |
|
![]() |
![]() |
![]() |
#26 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() Posts: 237
Karma: 516
Join Date: Nov 2015
Location: Europe EEC
Device: Kindle Fire HD6 & HD8
|
Quote:
My main problem was watching plugin runner's blue button oscillating backwards and forwards for several minutes before I remembered that you said something about having to select the regex engine. I couldn't find where to make that selection. I finally tracked down a postage-stamp-sized GUI which had opened behind the main Sigil window. Once I entered the regex in that gui, it worked well. I've tried several times on my MacBook, and that little gui always hides away behind the main window. |
|
![]() |
![]() |
![]() |
#27 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,509
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
HighDPI scaling on Linux and macOS retina scaling do terrible things to tkinter widgets. Not only are they often tiny, but they'll only match the system light/dark theme on macOS.
|
![]() |
![]() |
![]() |
#28 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 411
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
@Doitsu - Sorry 'bout that! You're right; i misunderstood. I thought your plugin was a straight regex validation tool. I didn't understand from your post that it was also a functional search/replace module.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Battery length | ORLOV | General Discussions | 22 | 07-28-2011 04:14 PM |
Which length of fiction? | crich70 | Writers' Corner | 12 | 06-03-2011 06:27 PM |
File length in MB only | clockmaker | Calibre | 1 | 07-20-2010 10:35 AM |
.7.5 - Zero Length Zips | edbro | Calibre | 2 | 06-27-2010 05:22 PM |
length of ebooks? | poshm | Writers' Corner | 20 | 11-17-2009 10:30 AM |