/** * Matches a string against a pre-compiled regular expression pattern. * * @param regex Regex Handle from CompileRegex() * @param str The string to check. * @param ret Error code, if applicable. * @param offset Offset in the string to start searching from. * @return Number of captures found or -1 on failure. * * @note Use the regex handle passed to this function to extract * matches with GetRegexSubString(). */ public static int MatchRegex(Handle regex, string str, ref RegexError ret /* = REGEX_ERROR_NONE*/, int offset = 0) { throw new NotImplementedException(); }
// Gets all matches from a string against a pre-compiled regular expression pattern. // // @param str The string to check. // @param ret Error code, if applicable. // @return Number of matches found or -1 on failure. // // @note Use GetSubString() and loop from 0 -> totalmatches - 1. public int MatchAll(string str, ref RegexError ret /* = REGEX_ERROR_NONE*/) { throw new NotImplementedException(); }
/** * 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. * * @param pattern The regular expression pattern. * @param flags General flags for the regular expression. * @param error Error message encountered, if applicable. * @param maxLen Maximum string length of the error buffer. * @param errcode Regex type error code encountered, if applicable. * @return Valid regex handle on success, INVALID_HANDLE on failure. */ public static Regex CompileRegex(string pattern, int flags, string error, int maxLen, out RegexError errcode /* = REGEX_ERROR_NONE*/) { throw new NotImplementedException(); }
// Matches a string against a pre-compiled regular expression pattern. // // @param str The string to check. // @param ret Error code, if applicable. // @param offset Offset in the string to start searching from. MatchOffset returns the offset of the match. // @return Number of captures found or -1 on failure. // // @note Use the regex handle passed to this function to extract // matches with GetSubString(). public int Match(string str, out RegexError ret /* = REGEX_ERROR_NONE*/, int offset = 0) { throw new NotImplementedException(); }