Return the text by the name used in a Named Capture (i.e., "(?<name> )").
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. Note, that all Named Captures are also assigned a reference register index value and thus can us use the getCaptureText() function above.
- Parameters
-
pName | [ in ] The literal string used explicitly in the regular expression to be associated with some captured text |
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. |