Matches a regexp to a string, returning offsets
This takes a regular expression object compiled previously with rex.new, and matches it against a target string. It takes the same arguments are re:match, however the table returned as the 3rd result consists of pairs of offsets, rather than the strings themselves.
Output from table.foreach:
In this case we see that the first capture was from columns 1 to 4, and the second capture was from columns 11 to 14.
See Also ...
Lua base functions
(Help topic: lua=re:exec)
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.
Gammon Software support
Forum RSS feed ( https://gammon.com.au/rss/forum.xml )