Skip to content

[feature] Possessive quantifiers not supported (*+, ++, ?+, {n,m}+) #42

@jbachorik

Description

@jbachorik

Summary

Possessive quantifiers (*+, ++, ?+, {n,m}+) are not supported. Like atomic groups, they match as much as possible and never give back characters to allow other parts of the pattern to match.

Examples

  • \d++ — consume all digits, never backtrack
  • [a-z]*+[a-z] — possessive star means the trailing [a-z] can never match (useful to express intent)
  • "[^"]*+" — efficiently match a quoted string without catastrophic backtracking

Impact

  • Filtered from integration test suite (reported as unsupported in testsuites/README.md)
  • Possessive quantifiers are syntactic sugar for (?>X{n,m}) (atomic group wrapping a quantifier)

Implementation Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions