lpeg.R
Returns a pattern that matches a range of characters
Prototype
lpeg.R ({range})
Description
Returns a pattern that matches any single character belonging to one of the given ranges. Each range is a string xy of length 2, representing all characters with code between the codes of x and y (both inclusive).
As an example, the pattern lpeg.R("09") matches any digit, and lpeg.R("az", "AZ") matches any ASCII letter.
As an example, the pattern lpeg.R("09") matches any digit, and lpeg.R("az", "AZ") matches any ASCII letter.
Lua functions
- lpeg.B - Matches patt n characters behind the current position, consuming no input
- lpeg.C - Creates a simple capture
- lpeg.Carg - Creates an argument capture
- lpeg.Cb - Creates a back capture
- lpeg.Cc - Creates a constant capture
- lpeg.Cf - Creates a fold capture
- lpeg.Cg - Creates a group capture
- lpeg.Cmt - Creates a match-time capture
- lpeg.Cp - Creates a position capture
- lpeg.Cs - Creates a substitution capture
- lpeg.Ct - Creates a table capture
- lpeg.locale - Returns a table of patterns matching the current locale
- lpeg.match - Matches a pattern against a string
- lpeg.P - Converts a value into a pattern
- lpeg.print - Outputs debugging information to stdout
- lpeg.S - Returns a pattern that matches a set of characters
- lpeg.setmaxstack - Sets the maximum size for the backtrack stack
- lpeg.type - Tests if a value is a pattern
- lpeg.V - Creates a non-terminal variable for a grammar
- lpeg.version - Returns the LPeg version