lua-users home
lua-l archive

[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