rrthomas / lrexlib

A Lua (5.1 and later) binding of various regex library APIs (POSIX, PCRE, PCRE2, GNU, Oniguruma and TRE)
Other
161 stars 29 forks source link

PCRE_UTF8 support? #25

Closed PaulBernier closed 8 years ago

PaulBernier commented 8 years ago

Does lrexlib supports 'u' compilation flag for PCRE to support UTF-8? http://php.net/manual/en/reference.pcre.pattern.modifiers.php I think it is not, out of curiosity I'd like to know what problem you encountered with that? Thanks.

shmuz commented 8 years ago

If you want to specify pattern compilation flags as a string then only letters listed in the manual are supported. 'u' is not listed. But one can always specify any flags as bitwise OR combination of their numeric values.

We didn't encounter any problem with flags. In fact, adding support for 'u' is trivial.

PaulBernier commented 8 years ago

Got it, it works. Thanks for the very fast reply.