We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using builtins.match I'd like to be able to do non-greedy matches.
builtins.match
Add support for ? in combination with e.g. * or +.
?
*
+
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.
{0,x}
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered:
Example:
❯ nix repl Nix 2.24.7 Type :? for help. nix-repl> builtins.match "(.*?)[ab].*" "zab" [ "za" ]
I would have expected z because .*? should be non greedy
z
.*?
Sorry, something went wrong.
No branches or pull requests
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.
The text was updated successfully, but these errors were encountered: