lua-users home
lua-l archive

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


> In PCRE I would write it like this:
>
>   I see [0-9]{4,6} cattle

If you do not want to write a repetition function, you can use something
like this:

  num = -digit^7 * digit^4

Not terrificly efficient (reads the number twice), but does the job.

-- Roberto