lua-users home
lua-l archive

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


Roberto Ierusalimschy wrote:

You can use empty captures with string.match to know where you are.
string.match(s, "()pat()") is almost equivalent to string.find(s, "pat").
(Usually you can capture more useful and efficient positions.)

Oh, now I see it's possible, though (IMHO) it seems much less elegant
than it used to be with old good string.find.

--
Shmuel