RegExp.NoUTF8Check (gb.pcre)

Const NoUTF8Check As Integer = 1073741824 ' &H40000000

When the UTF8 option is set, the validity of the pattern as a UTF-8 string is automatically checked.

If an invalid UTF-8 sequence of bytes is found, the Compile method returns an error. If you already know that your pattern is valid, and you want to skip this check for performance reasons, you can set the RegExp.NoUTF8Check option. When it is set, the effect of passing an invalid UTF-8 string as a pattern is undefined. It may cause your program to crash.

Note that this option can also be passed to Exec, to suppress the UTF-8 validity checking of subject strings.