Re: Matching a fixed number of repetitions in LPeG
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Matching a fixed number of repetitions in LPeG
- From: Hinrik Örn Sigurðsson <hinrik.sig@...>
- Date: 2012年6月19日 20:55:56 +0000
On Tue, Jun 19, 2012 at 8:02 PM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>
> I guess we can use grammars to avoid both those long programs and
> match-time captures. The following code should do the trick. (Obs:
> not hard tested; a better implementation could choose to use plain
> repetitions for small n's.)
Thanks, that works. How about when you need to specify both minimum
and maximum repetitions? E.g. like /\w{3,10}/ in Perl.