[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: LPeg: captures -- Bug?
- From: Александр Машин <alex.mashin@...>
- Date: Sat, 30 May 2015 23:05:50 +0700
Dear all,
It seems that a string capture within a function capture breaks the latter.
Example:
local re= require "re"
local str= 'abaababbb'
local captured
local function func(s) captured= send
local g = re.compile("( 'b' / ( 'a' -> 'A' ) )* -> func", {func= func})
g:match(str)
print captured --> prints "A" but "AbAAbAbbb" expected
Is this a bug or a feature?
Alexander Mashin