-
Notifications
You must be signed in to change notification settings - Fork 12
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 maximum repetition count #38
Comments
Does this do what you want? I'd accept a PR explaining (in the haddocks) how to do this for others who may be looking for the same thing. |
Yes, that's what I need for now. Although it looks like they only have a greedy one, so if I instead needed the non-greedy |
Ah, good point. In that case it may be worth defining our own function. |
I dropped in intending to ask this in a separate issue, but this seems like a good spot: What is the best way to quantify numerically? I know you can cobble something together out of what's already there. For instance, to match exactly
But is this more or less it? Or is there some count-style combinator already built in, that I'm missing in the docs? |
Have you seen the |
My apologies: I did see it, but did not understand the context.. I hadn't realized it applies to all instances of alternative. I thought it was more like the Thank you! |
Consider the regex
\d{,6}
. I'd like this library to contain a functionreplicateAlt
that lets me implement this regex asreplicateAlt 6 digit
. One possible implementation would be a duplicate ofreplicateM
, but with<|> pure []
on the end of the recursive case.If you like this idea, I can PR it, but I'm not sure which module you want it in.
The text was updated successfully, but these errors were encountered: