CompileRegex Function

Precompile a regular expression. Use this if you intend on using the same expression multiple times. Pass the regex handle returned here to MatchRegex to check for matches.

Regex CompileRegex(const char[] pattern, int flags, char[] error, int maxLen, RegexError& errcode)

Parameters

const char[] pattern

The regular expression pattern.

int flags

General flags for the regular expression.

char[] error

Error message encountered, if applicable.

int maxLen

Maximum string length of the error buffer.

RegexError& errcode

Regex type error code encountered, if applicable.

Return Value

Valid regex handle on success, INVALID_HANDLE on failure.