MatchRegex Function

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

int MatchRegex(Handle regex, const char[] str, RegexError &ret)

Parameters

Handle regex

Regex Handle from CompileRegex()

const char[] str

The string to check.

RegexError& ret

Error code, if applicable.

Return Value

Number of substrings found or -1 on failure.

Notes

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