[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Missing string.find functionality in Lua 5.1
- From: Shmuel Zeigerman <shmuz@...>
- Date: Mon, 12 Sep 2005 18:09:36 +0200
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.