LuaJIT throws the exception "invalid escape sequence near [^%w' that Lua5.1 does not

  • From: Crew <carborundumcrew@xxxxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 22 May 2017 05:45:11 -0700

Hi folks,

I am trying to convert to using LuaJIT from Lua5.1 and hit this error in one of the Lua modules.

As I stated in the subject above LuaJIT is throwing an invalid escape sequence exception on a sequence that Lua5.1 accepts.

The string that causes the problem is '[^%w\-_ ]'.

Is this a known problem? Is there a workaround apart from deleting the backslash?

--
Infogalactic: the planetary knowledge core

Other related posts: