lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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.