Skip to content

Support for non-greedy/lazy wildcards #202

Description

@matanlb

Hey,

I've recently found about about this package and started to convert or regexes :)

One major thing I noticed missing is the ability to add lazy/non-greedy wildcards.
I thing All functions that make use of the '' or '+' wildcard should have an optional parameter or an equivalent functions that uses '?'/'+?'
Since the code puts most of the expressions in a non-capturing group we can't just use .add('?') afterward.

This was discussed a bit in the dart repo. This is really important to avoid unexpected inclusion in the wildcard.

Effected functions:
anything, anythingBut, something, somethingBut, multiple.

OneOrMore should probably be included as well but currently it doesn't use a non-capturing so we still follow it up with .add('?')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions