Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for non-greedy/lazy wildcards #202

Open
matanlb opened this issue Aug 27, 2020 · 1 comment
Open

Support for non-greedy/lazy wildcards #202

matanlb opened this issue Aug 27, 2020 · 1 comment

Comments

@matanlb
Copy link

matanlb commented Aug 27, 2020

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('?')

@shreyasminocha
Copy link
Member

This is going to be a thing in version 2. You'll be able to use multiple.lazy and multiple.greedy (alias) in addition to multiple and similarly with the rest of the repetition operators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants