Regular Expression

mruby_nginx_module's Regular Expression Engine is based mruby-regexp-pcre.

Regexp

re = Regexp.compile("(.)(.)")
re.match("ab")
result = Regexp.last_match.class == MatchData and
         Regexp.last_match[0] == "ab" and
         Regexp.last_match[1] == "a" and
         Regexp.last_match[2] == "b" and
         Regexp.last_match[3] == nil
Nginx.rputs(result.to_s + "\n") # => true

Don't include other Regexp based PCRE

In mruby_nginx_module (or ngx_mruby), Regexp based PCRE like mruby-regexp-pcre is not able to use directly.

Because Nginx orverrides pcre_(malloc|free).

mruby_nginx_module orverrides pcre_(malloc|free) moreover.