Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Possessive quantifier matches where an ordinary quantifier doesn't #106052

Closed
Assignees
serhiy-storchaka
Labels
3.11only security fixes3.12only security fixes3.13bugs and security fixestopic-regextype-bugAn unexpected behavior, bug, or error
@benrg

Description

@benrg
>>>importre>>>re.fullmatch('(?:ab?c)*','a')>>>re.fullmatch('(?:ab?c)*+','a')<re.Matchobject;span=(0,1),match='a'>>>>

I'm not sure that I completely understand the behavior of the possessive quantifiers, but I think that ifR* doesn't match a string thenR*+ shouldn't match it, whereR is any regex.

Versions tested:

3.12.0b3 (tags/v3.12.0b3:f992a60, Jun 20 2023, 12:25:40) [MSC v.1936 64 bit (AMD64)]3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:30:09) [MSC v.1934 32 bit (Intel)]3.11.4 (main, Jun 14 2023, 18:33:43) [GCC 10.2.1 20210110]

Linked PRs

Metadata

Metadata

Labels

3.11only security fixes3.12only security fixes3.13bugs and security fixestopic-regextype-bugAn unexpected behavior, bug, or error

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp