LPeg

LPeg is a pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs). LPeg defines patterns as first-class objects; patterns are regular Lua values (represented by userdata). This topic is useful for several functions in creating and compose patterns.

Portions of this topic are reprinted under permission of the LPeg license.