lua-users home
lua-l archive

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


Hi Eduardo,

[Please don't top-post.]

On Fri, May 11, 2012 at 3:53 PM, Eduardo Ochs <eduardoochs@gmail.com> wrote:
> that returns the position after the match _after_ all the other captures...

Try:

local lpeg = require "lpeg"
p = lpeg.Cg("a", "grouped") * lpeg.Cp() * lpeg.Cb "grouped";
print(p:match("a"))
2       a

-- 
- Patrick Donnelly