Not the same as using it in the replacement string.
On 20/08/15 03:54 PM, Fidelis Assis wrote:
Can also be used for expansion of positional notation
s = '1010'
print((string.gsub(s, "()(.)", function (p, d) return ' + ' .. d .. '*2^' .. #s-p end))
+ 1*2^3 + 0*2^2 + 1*2^1 + 0*2^0
and base conversion.
-- Fidelis