re:gmatch |
---|
Summary Matches a regexp to a string, applying a function Prototype
Description The gmatch function: Tries to match the regex re against string up to count times (or as many as possible if count is either not given or is not a positive number), subject to execution flags "flags". Each time there is a match, fun is called as fun (m, t), where m is the matched string and t is a table of substring matches (this table contains false in the positions where the corresponding sub-pattern did not match.). If fun returns a true value, then gmatch immediately returns. gmatch returns the number of matches made.
Output from function during execution: Nick goes East See Also ... Lua functions
re:exec - Matches a regexp to a string, returning offsets
Topics
Lua base functions
(Help topic: lua=re:gmatch) |
Enter a search string to find matching documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.