Repository navigation
SRE: Atomic Grouping (?>...) is not supported #34627
Description
Activity
from the jeffrey friedl report:
(?>...) is not supported
[this is a "stand-alone pattern". the engine has code
for this, but the parser doesn't recognize this yet.
shouldn't be too hard to fix; I just need a couple of
good test cases before I start /F]- addedtype-featureA feature request or enhancementA feature request or enhancement
on Jun 14, 2001 - addedtype-featureA feature request or enhancementA feature request or enhancement
on Jun 14, 2001 Also referred to as an atomic group: see
http://www.regular-expressions.info/atomic.html for a discussion.Fredrik, when you say "the engine has code for this", what do you mean?
There's also an alternate syntax for this, called possessive
quantifiers: a*+, a++, a{m,n}+.Fredrik,
If you're still listening, I am gonna try and tackle this one but I
would like to know why you or the famous Jeffrey of the Regexp world
claims that there is already code in the Regexp Engine for Atomic
Grouping? Adding a hook for (?>...) should be trivial but I don't wanna
re-invent the wheel if the proper stack-unwind code already exists.
Thanks. Of course, Andrew (a.k.a. A.M. Kuchling) already asked this
question and you did not answer it, so I guess you're not reading this,
but if you are, please respond. Thanks!- changed the title
[-]SRE: (?>...) is not supported[/-][+]SRE: Atomic Grouping (?>...) is not supported[/+]on Mar 28, 2008 - changed the title
[-]SRE: (?>...) is not supported[/-][+]SRE: Atomic Grouping (?>...) is not supported[/+]on Mar 28, 2008 I'm digging into the sre_parse.py at the moment and this I have all the
changes I need for that now. The rest of the changes I believe are in
either sre_compile.py or more likely directly in _sre.c, so I will
examine those files next. I am attaching a single diff for
expedience. This is not an official patch, just a sample to see the
progress I am making. I forgot the correct format for patch files but
I promise to get it right when I have made more progress.- addedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
on Mar 29, 2008 4 remaining items
Some unrelated to the topic changes from the patch are committed in 30a6c74ad87f.
Reopened because definitely regex will be not adopted in 3.5.
Here is updated to 3.5 Jeffrey's patch.
New changeset 345b390 by Serhiy Storchaka in branch 'main':
bpo-433030: Add support of atomic grouping in regular expressions (GH-31982)
345b390Closing because GH-31982 has been merged.
Reacted by Ilyas Bakirov (aka eRIC)This feature addition led to #106052
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields: