Maybe I am missing something, but why do I get from this program:
local first = "catalogue-ctan"
local cdata = string.gsub(first,'^catalogue-', '')
print ("first = "..first)
print ("cdata = "..cdata)
the output:
first = catalogue-ctan
cdata = e-ctan
Same happens with
local cdata = string.match(first,'^catalogue-(.*)')
(texlua from TeX Live repository)
Best wishes
Norbert
-------------------------------------------------------------------------------
Dr. Norbert Preining Vienna University of Technology
Debian Developer Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
which will engulf the
Galaxy in fire and destruction, and possibly bring the
Universe to a premature doom. I mean it,' he added.
with luck I'll be
drunk enough not to notice.'
--- Ford ensuring everyone knew where his priorities lay.
--- Douglas Adams, The Hitchhikers Guide to the Galaxy