lua-users home
lua-l archive

Re: Feature request: plain option for gsub

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


On 20/08/2014 23:12, Petite Abeille wrote:
On Aug 20, 2014, at 10:02 PM, Shmuel Zeigerman <shmuz@013net.net> wrote:
On my system, '%p' does not match '[+$^]', so '%p' should become '[%p+$^]’.
Hmmm?
$ lua -v
Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio
print( ( '[+$^]' ):gsub( '%p', '%%%1' ) )
%[%+%$%^%]
I was actually using s:gsub(...) that due to the modified string metatable called unicode.utf8.gsub(s,...) from the Selene Unicode library.
Sorry for not paying attention to that.
--
Shmuel

AltStyle によって変換されたページ (->オリジナル) /