I've no idea. But I never felt that stdlib re is not capable enough. If something needs a powerful regex engine I don't use a regex for it. I value my sanity.
@AndrasDeak Ok. Well, my needs are often hypothetical too. I just like to have the biggest hammer available handy, in case I have to hit something really hard.
Yes. Regular languages are what can be easily described by regular expressions. When you try to parse irregular things with regex Bad Things start to happen
@Wildcard thanks again for the Krita tip, I just tried it. Works like a charm! At first I thought my stylus was misconfigured, because the button wouldn't draw, it would only move the canvas. Turns out that it was working better than I expected: I had to press the stylus on the tablet and it's just that the default tool's pressure profile was such that I had to press harder than expected.
I've switched to a flat pressure-profile tool and it seems perfect for my use case. Of course I'll spend an hour or two just figuring out where all the functionality is, but it does seem absolutely great
The gnome settings are quite alright. There's also gnome-tweaks (née gnome-tweak-tools) which adds some nice functionality, but I can almost always make do with the normal settings.
The two exceptions I can think of are printers (hp-setup usually works better) and the aforementioned audio
This is probably a dumb question and I should know the answer. And perhaps I do know and have forgotten. But why doesn't ( )+ work as an alternative to ` +` for a regex corresponding to at least one blank space?
@AndrasDeak I tried ( )+ inside a regex, but it didn't work for me. But ` +` worked as expected. Python 3.7 on Debian stable/buster, though I doubt they'd change something like this across Python versions.
@FaheemMitha you probably forgot to account for the change in capture group numbering if you have 2 more capture groups
I left a comment with code including that adjustment, and it works
The error I got without the adjustment was a KeyError because ' ' is not a key in your dict. So the match was fine, but you were referring to the wrong group.
@AndrasDeak That should be documented somewhere. But the trouble with all these regex variations is that it leaves one not knowing exactly what's going to happen in a given situation with a given engine.
> If a group matches multiple times, only the last match is accessible:
And having thought about it a bit, it sort of makes sense. (a)+ should not correspond to (aaa). It should correspond to (a)(a)(a) at best. So the question is whether each should be a group of its own, perhaps.
Moderators (cc @terdon who's technically in the room): I answered a question that somehow went HNQ, but the question is not amazing and afterward I realized that it's pretty much a dupe. Don't you think it should at least be kicked out of HNQ?
There's actually very little information about the circumstances and what works and how for OP.
@AndrasDeak mods can remove Q's from HNQ; closed Q's should be removed automatically after 3 minutes, to my understanding based on meta.stackexchange.com/q/325060/307535 and others.
@AndrasDeak I don't see a timeline entry for it being kicked out (though I'm not 100% it would), but I do see an option for me to remove it from HNQ, suggesting it's still eligible.