implement regexp builtins in C to preserve regexp syntax