lua-users home
lua-l archive

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


> I have a feature request for Lua: please add an additional plain
> option to gsub which defaults to false. If it is true, it should make
> gsub behave like replace() in JavaScript (replace without any pattern
> matching).
> 
> [...]
> 
> For something like a basic replace() function without patterns (those
> obviously can't be used on user-provided strings without escaping
> hassle), the provided built-in solution should be better.

Are you aware that the example you gave (replace() in JavaScript) also
cannot be used on user-provided strings without escaping hassle?

(I could not resist...)

-- Roberto