lua-users home
lua-l archive

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

In (some versions) of regular expression syntax, the construct x{m,n}
matches between m and n copies of the pattern x. So, for example,
\d{3,5} matches 3-5 digits. However, I can't find a precise equivalent
in lpeg - it appears that the only way is to repeat the pattern m
times, then add ( the pattern ^ - (n-m) ). Is that the case?