Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IRegex::getNamedCaptureText ( const P6CHAR pName,
P6UINT32 pOffset,
P6UINT32 pLength 
)
pure virtual

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
SuccessP6R::eOk 
FailureP6R::eNotInitializedA successful call to initialize was not made before this call.
P6R::eInvalidArgpOffset or pLength is NULL, or pTextSize value is zero.
P6R::eAccessFaultThe 'match','search', or 'replace' method must be successfully called before this function.
P6R::eMatchEmptyThe index back reference is the empty string.
P6R::eNotFoundThe index back reference does not exist.