lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


<Quote from Lua 5.1 alpha manual>
    Changes in the Libraries
Function string.find does not return its captures.
Use string.match for that.
<End Quote>

It seems to me that it is a step backwards.

Before this change, it was possible to traverse texts using
string.find only and obtain everything: whole matches,
captures and the pieces lying between the matches.

To get this functionality with Lua 5.1, one should use
2 functions instead: string.find and string.match.

Am I wrong?

--
Shmuel