KEMBAR78
Regex - Support Possessive Quantifiers · Issue #24381 · dotnet/runtime · GitHub
Skip to content

Regex - Support Possessive Quantifiers #24381

@ViktorHofer

Description

@ViktorHofer

Current popular regex engines like java.util.regex or PCRE support greedy, lazy and possessive quantifiers. The current .NET regex engine does only support the former two. Though possessive quantifiers are syntactic sugar and can be mimicked with atomic grouping today, consider supporting them as they gained popularity over the last years.

Abstract:
Possessive quantifiers work the same as greedy quantifiers but without backtracking on the input string. That means that the following pattern D++[A-Z]+ matches the input string DDDDE but not DDDD.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Text.RegularExpressionsenhancementProduct code improvement that does NOT require public API changes/additionshelp wanted[up-for-grabs] Good issue for external contributors

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions