MatchRegex

Last Updated2020-02-26
Created At2008-03-26

Matches a string against a pre-compiled regular expression pattern.

Notes

Use the regex handle passed to this function to extract matches with GetRegexSubString().

native int MatchRegex(Handle regex, const char[] str, RegexError& ret = REGEX_ERROR_NONE, int offset = 0)

Parameters

Handle regex
Regex Handle from CompileRegex()
const char[] str
The string to check.
RegexError& ret
Error code, if applicable.
int offset
Offset in the string to start searching from.

Return Value

int Number of captures found or -1 on failure.