Escaping Regex Characters in Lua
Quick little note mainly for myself: Lua regex is different than PCRE. The big place it differs is in where you escape pattern matching characters (e.g. .
, ?
, +
, etc.). In PCRE, you escape these with a leading backslash (e.g., \.
, \?
, \+
). However, with Lua, you use the %
character: %.
, %?
, %+
.