lua-users home
lua-l archive

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


Dear all,

is there an LPEG rule to describe a set of characters, in which characters can be in any order, and each can be present only once or not at all?

Examples, assuming that allowed flags are 'i', 'm', 's':
* matching:
** 'ims',
** 'si',
** 'i',
** '';
* not matching:
** 'iu' (unknown flag),
** 'imi' (i repeats twice).

Alexander Mashin