lua-users home
lua-l archive

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

Joseph Stewart wrote:
Can anyone suggest a pattern to match text in the following format:

Must start with a upper-case letter.
Must be followed by one or more lower-case letter.
Above conditions must repeat at least one time (but could be many).

Lua string library only supports repetitions of a character class. To specify arbitrary repeated patterns in Lua you might want using an external regex library.

Lua bindings for two such libraries are available at Reuben Thomas' site: