Hi,
Yes, those options are to be added separately since there is a
Lua-land cache of compiled regexes maintained by lua-resty-core. In
short:
1. Don't forget to require "resty.core", as Robert noted.
2. Pass the "jo" options if you have JIT PCRE enabled.
3. Eventually, consider re-using the 'res' table to reduce the GC
load, as documented in the last section of the ngx_re.split() API
documentation:
https://github.com/openresty/lua-resty-core/blob/master/lib/ngx/re.md
4. Be wary of splitting tokens like "|", are those are, obviously,
special character for the PCRE engine.
--
Thibault
On 4/28/17 1:00 AM, Igor Clark wrote:
.