GetSubString

Last Updated2019-07-31
Created At2014-10-30

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.

Notes

str_id = 0 is the full captured string, anything else is the capture group index. if Regex.Match is used match can only be 0

native bool GetSubString(int str_id, char[] buffer, int maxlen, int match = 0)

Parameters

int str_id
The index of the expression to get - starts at 0, and ends at captures - 1.
char[] buffer
The buffer to set to the matching substring.
int maxlen
The maximum string length of the buffer.
int match
Match to get the captures for - starts at 0, and ends at MatchCount() -1

Return Value

bool True if a substring was found, False on fail/error