lua-users home
lua-l archive

Re: Lua 5.3.3 empty match behaviour with the '-' modifier

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


> Must we conclude, therefore, that the '-' modifier as the last character of
> a pattern will never match any character of the class it modifies?
Sure. PiL says that since its first edition:
 https://www.lua.org/pil/20.4.html
 "It never makes sense to write a pattern that begins or ends with the
 modifier '-'"
(although the part about not *beginning* with a '-' is not exactly true...)
-- Roberto

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