Skip to content
Philipp Janda edited this page Mar 16, 2015 · 1 revision

String Library Pattern Matching

Lua 5.2 and 5.3 allow the NUL character ('\0') in patterns. Lua 5.1 uses a separate character class (%z) for this. The compatibility functions of the string library unconditionally replace NUL characters with the character class in patterns. This does not work correctly in character ranges (e.g. "[\0-\127]").

Clone this wiki locally