Logo Search packages:      
Sourcecode: icu version File versions  Download package

U_STABLE int32_t U_EXPORT2 uregex_start ( URegularExpression regexp,
int32_t  groupNum,
UErrorCode status 
)

Returns the index in the input string of the start of the text matched by the specified capture group during the previous match operation. Return -1 if the capture group was not part of the last match. Group #0 refers to the complete range of matched text. Group #1 refers to the text matched by the first set of capturing parentheses.

Parameters:
regexp The compiled regular expression.
groupNum The capture group number
status A reference to a UErrorCode to receive any errors.
Returns:
the starting position in the input of the text matched by the specified group. ICU 3.0

Definition at line 703 of file uregex.cpp.

References FALSE.

                                           {
    RegularExpression *regexp = (RegularExpression*)regexp2;
    if (validateRE(regexp, status) == FALSE) {
        return 0;
    }
    int32_t result = regexp->fMatcher->start(groupNum, *status);
    return result;
}


Generated by  Doxygen 1.6.0   Back to index