Please try to run lua_notsupported when any unsupported patterns are found. I'd rather this function not work at all than to hide unimplemented features.

Also, please rename this function lua_pattern_to_regex (matches the style of the rest of the codebase).

One of the main reasons I didn't implement this was because there is no way to do %bxy with regex, so no regex-based solution will work 100% of the time. I wouldn't mind adding in partial support (as you've done here) though.