Lua Methods Reference > LuaRegexMatch Methods

LuaRegexMatch Methods

Topics in this Section

A LuaRegexMatch object provides information about the matches for a regular expression found in a string. For example, the regex_search function returns a LuaRegexMatch object.
If a match is found for a regular expression at multiple points in the string, you can use the next() method to get a LuaRegexMatch object for the next match.
If the regular expression contained sub-expressions (surrounded by parentheses) the methods of LuaRegexMatch objects can also be used to retrieve information about the sub-expression matches.
If you have a LuaRegexMatch object called match you can call its methods using the ":" operator. For example: