Skip to content

Support non-greedy in regex #12095

Open
Open
@ModProg

Description

Is your feature request related to a problem?

When using builtins.match I'd like to be able to do non-greedy matches.

Proposed solution

Add support for ? in combination with e.g. * or +.

Alternative solutions

I could probably use {0,x} where I increase x slowly until I get a match therefor implementing this in nix instead of relying on a regex feature.

Additional context

Checklist


Add 👍 to issues you find important.

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions