lua-users home
lua-l archive

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


2014-08-22 9:43 GMT+02:00 Coroutines <coroutines@gmail.com>:

> I've rarely needed a plain gsub(), but when I have it's been very
> tedious to go look through the docs to remember what to escape.

What may be more useful than another parameter to gsub would be
a function string.plain, which returns a pattern that matches the
exact string. Then one can write

   str:gsub(pattern:plain(),repl)

and you never need to see the ugly details.