Re: Suggestion for a pattern item (gsub)
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Suggestion for a pattern item (gsub)
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2002年4月16日 09:09:11 -0300
> - Character class followed by {n,m}, which matches n or more until m
> ocurrences of the character class. When m is ommited, it matches exactly n
> characters.
You can emulate that building the pattern:
strrep(pat, n) .. strrep(pat..'?', (m or n) - n)
-- Roberto