Skip to content

Is there a way to match a pattern an exact number of times ? #133

Answered by renggli
loloof64 asked this question in Q&A
Discussion options

You must be logged in to vote

There is times(count) for an exact number of repetitions, and repeat(min, max) for a range.

final exact = pattern('dfr').times(4);
final range = pattern('dfr').range(2, 4);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@loloof64
Comment options

Answer selected by loloof64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants