Skip to content
Permalink
Browse files

Correct malformed Regex documentation (#1055)

  • Loading branch information...
hydrogen-mvm authored and Headline committed Jul 31, 2019
1 parent 5868ffd commit fb9b284bcf8fdc2dd3a15f38c16eb424ec3183d9
Showing with 2 additions and 5 deletions.
  1. +2 −5 plugins/include/regex.inc
@@ -126,7 +126,6 @@ methodmap Regex < Handle
// Matches a string against a pre-compiled regular expression pattern.
//
// @param str The string to check.
// @param regex Regex Handle from CompileRegex()
// @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.
@@ -138,19 +137,17 @@ methodmap Regex < Handle
// Gets all matches from a string against a pre-compiled regular expression pattern.
//
// @param str The string to check.
// @param regex Regex Handle from CompileRegex()
// @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 native int MatchAll(const char[] str, RegexError &ret = REGEX_ERROR_NONE);

// Returns a matched substring from a regex handle.
//
//
// Substring ids start at 0 and end at captures-1, where captures is the
// number returned by Regex.Match or Regex.CaptureCount.
//
// @param regex The regex handle to extract data from.
// @param str_id The index of the expression to get - starts at 0, and ends at captures - 1.
// @param buffer The buffer to set to the matching substring.
// @param maxlen The maximum string length of the buffer.
@@ -199,8 +196,8 @@ native Regex CompileRegex(const char[] pattern, int flags = 0, char[] error="",
/**
* Matches a string against a pre-compiled regular expression pattern.
*
* @param str The string to check.
* @param regex Regex Handle from CompileRegex()
* @param str The string to check.
* @param ret Error code, if applicable.
* @return Number of captures found or -1 on failure.
*

0 comments on commit fb9b284

Please sign in to comment.
You can’t perform that action at this time.