CompileRegex

Last Updated2014-10-30
Created At2008-03-26

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.

native Regex CompileRegex(const char[] pattern, int flags = 0, char[] error = "", int maxLen = 0, RegexError& errcode = REGEX_ERROR_NONE)

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

Regex Valid regex handle on success, INVALID_HANDLE on failure.