comp • gb.pcre • regexp • compile

RegExp.Compile (gb.pcre)

Sub Compile ( Pattern As String [ , CompileOptions As Integer ] )

Compile allows you to pre-compile a regular expression for later execution by the Exec method. This is useful when you have one pattern which you want to match against a lot of text, because compiling once and executing many times is much faster than compiling and executing every time.

Compile and Exec are both called automatically if you specify a pattern and subject text when creating a RegExp object.

Here is the list of compilation options that can be specified: