-
Hi ! Is there a way to match a pattern a given number of times ? For example, I want to match the pattern Otherwise, if I must write it several times, is there a way to catch the group as "a single match" ? I mean, it is grouped as if I wrote it in another rule. Regards |
Beta Was this translation helpful? Give feedback.
Answered by
renggli
Feb 15, 2022
Replies: 1 comment 1 reply
-
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); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
loloof64
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is times(count) for an exact number of repetitions, and repeat(min, max) for a range.