[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Feature request: plain option for gsub
- From: Dirk Laurie <dirk.laurie@...>
- Date: Fri, 22 Aug 2014 09:54:54 +0200
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.