lua-users home
lua-l archive

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


Mark Edgar wrote:

For an arbitrarily complicated pattern, this function will do what you want:

[snip]
Thanks for the excellent code which I intend to make use of. Your solution is in fact more generic than that I was proposing. But still, it'd be nice to have this functionality "out of the box".

Yet another thing that I miss in string.gsub is the ability to break the process after arbitrary match (when the `repl' function returns some dedicated value that means "no further replaces are needed").

--
Shmuel