Return the text by the 1st, 2nd, 3rd, etc set of capturing parentheses.
Essentially, this method returns the value of a back reference. This is done by returning the starting byte offset into the original input string to the match, search, or replace methods, and the length of the captured text. The caller can then use this information to index their buffer to extract out the actual text.
- Parameters
-
index | [ in ] The number of the capturing parenthese (or back reference), starts at 1. |
pOffset | [ out ] Index into input string buffer (i.e., pSearch or pMatch) used in calls to the 'match','search' or 'replace' methods |
pLength | [ out ] Length of the matching substring in the input string buffer (i.e., pSearch of pMatch) |
- Returns
Success | P6R::eOk | |
Failure | P6R::eNotInitialized | A successful call to initialize was not made before this call. |
P6R::eInvalidArg | pOffset or pLength is NULL, or pTextSize value is zero. |
P6R::eAccessFault | The 'match','search', or 'replace' method must be successfully called before this function. |
P6R::eMatchEmpty | The index back reference is the empty string. |
P6R::eNotFound | The index back reference does not exist. |