Home | History | Annotate | Download | only in i18n

Lines Matching refs:regexp

323     RegularExpression *regexp = (RegularExpression*)regexp2;
325 if (validateRE(regexp, FALSE, status) == FALSE) {
329 *patLength = regexp->fPatStringLen;
331 return regexp->fPatString;
343 RegularExpression *regexp = (RegularExpression*)regexp2;
344 return regexp->fPat->patternText(*status);
355 RegularExpression *regexp = (RegularExpression*)regexp2;
356 if (validateRE(regexp, FALSE, status) == FALSE) {
359 int32_t flags = regexp->fPat->flags();
374 RegularExpression *regexp = (RegularExpression*)regexp2;
375 if (validateRE(regexp, FALSE, status) == FALSE) {
383 if (regexp->fOwnsText && regexp->fText != NULL) {
384 uprv_free((void *)regexp->fText);
387 regexp->fText = text;
388 regexp->fTextLength = textLength;
389 regexp->fOwnsText = FALSE;
393 regexp->fMatcher->reset(&input);
407 RegularExpression *regexp = (RegularExpression*)regexp2;
408 if (validateRE(regexp, FALSE, status) == FALSE) {
416 if (regexp->fOwnsText && regexp->fText != NULL) {
417 uprv_free((void *)regexp->fText);
420 regexp->fText = NULL; // only fill it in on request
421 regexp->fTextLength = -1;
422 regexp->fOwnsText = TRUE;
423 regexp->fMatcher->reset(text);
437 RegularExpression *regexp = (RegularExpression*)regexp2;
438 if (validateRE(regexp, FALSE, status) == FALSE) {
442 if (regexp->fText == NULL) {
444 UText *inputText = regexp->fMatcher->inputText();
447 regexp->fText = inputText->chunkContents;
448 regexp->fTextLength = (int32_t)inputNativeLength;
449 regexp->fOwnsText = FALSE; // because the UText owns it
452 regexp->fTextLength = utext_extract(inputText, 0, inputNativeLength, NULL, 0, &lengthStatus); // buffer overflow error
453 UChar *inputChars = (UChar *)uprv_malloc(sizeof(UChar)*(regexp->fTextLength+1));
455 utext_extract(inputText, 0, inputNativeLength, inputChars, regexp->fTextLength+1, status);
456 regexp->fText = inputChars;
457 regexp->fOwnsText = TRUE; // should already be set but just in case
462 *textLength = regexp->fTextLength;
464 return regexp->fText;
477 RegularExpression *regexp = (RegularExpression*)regexp2;
478 if (validateRE(regexp, FALSE, status) == FALSE) {
481 return regexp->fMatcher->getInput(dest, *status);
494 RegularExpression *regexp = (RegularExpression*)regexp2;
495 if (validateRE(regexp, FALSE, status) == FALSE) {
498 regexp->fMatcher->refreshInputText(text, *status);
518 RegularExpression *regexp = (RegularExpression*)regexp2;
520 if (validateRE(regexp, TRUE, status) == FALSE) {
524 result = regexp->fMatcher->matches(*status);
526 result = regexp->fMatcher->matches(startIndex, *status);
548 RegularExpression *regexp = (RegularExpression*)regexp2;
550 if (validateRE(regexp, TRUE, status) == FALSE) {
554 result = regexp->fMatcher->lookingAt(*status);
556 result = regexp->fMatcher->lookingAt(startIndex, *status);
579 RegularExpression *regexp = (RegularExpression*)regexp2;
581 if (validateRE(regexp, TRUE, status) == FALSE) {
585 regexp->fMatcher->resetPreserveRegion();
586 result = regexp->fMatcher->find();
588 result = regexp->fMatcher->find(startIndex, *status);
602 RegularExpression *regexp = (RegularExpression*)regexp2;
603 if (validateRE(regexp, TRUE, status) == FALSE) {
606 UBool result = regexp->fMatcher->find();
618 RegularExpression *regexp = (RegularExpression*)regexp2;
619 if (validateRE(regexp, FALSE, status) == FALSE) {
622 int32_t result = regexp->fMatcher->groupCount();
638 RegularExpression *regexp = (RegularExpression*)regexp2;
639 if (validateRE(regexp, TRUE, status) == FALSE) {
647 if (destCapacity == 0 || regexp->fText != NULL) {
654 int32_t startIx = regexp->fMatcher->start(groupNum, *status);
655 int32_t endIx = regexp->fMatcher->end (groupNum, *status);
678 u_memcpy(dest, &regexp->fText[startIx], copyLength);
701 RegularExpression *regexp = (RegularExpression*)regexp2;
702 if (validateRE(regexp, TRUE, status) == FALSE) {
707 return regexp->fMatcher->group(groupNum, dest, *groupLength, *status);
720 RegularExpression *regexp = (RegularExpression*)regexp2;
721 if (validateRE(regexp, TRUE, status) == FALSE) {
726 if (regexp->fText != NULL) {
731 int32_t startIx = regexp->fMatcher->start(groupNum, *status);
732 int32_t endIx = regexp->fMatcher->end (groupNum, *status);
739 utext_replace(dest, 0, utext_nativeLength(dest), &regexp->fText[startIx], endIx - startIx, status);
742 utext_openUChars(&groupText, &regexp->fText[startIx], endIx - startIx, status);
749 return regexp->fMatcher->group(groupNum, dest, *status);
769 RegularExpression *regexp = (RegularExpression*)regexp2;
770 if (validateRE(regexp, TRUE, status) == FALSE) {
773 int32_t result = regexp->fMatcher->start(groupNum, *status);
793 RegularExpression *regexp = (RegularExpression*)regexp2;
794 if (validateRE(regexp, TRUE, status) == FALSE) {
797 int32_t result = regexp->fMatcher->end(groupNum, *status);
817 RegularExpression *regexp = (RegularExpression*)regexp2;
818 if (validateRE(regexp, TRUE, status) == FALSE) {
821 regexp->fMatcher->reset(index, *status);
843 RegularExpression *regexp = (RegularExpression*)regexp2;
844 if (validateRE(regexp, TRUE, status) == FALSE) {
847 regexp->fMatcher->region(regionStart, regionLimit, *status);
862 RegularExpression *regexp = (RegularExpression*)regexp2;
863 if (validateRE(regexp, TRUE, status) == FALSE) {
866 regexp->fMatcher->region(regionStart, regionLimit, startIndex, *status);
883 RegularExpression *regexp = (RegularExpression*)regexp2;
884 if (validateRE(regexp, TRUE, status) == FALSE) {
887 return regexp->fMatcher->regionStart();
905 RegularExpression *regexp = (RegularExpression*)regexp2;
906 if (validateRE(regexp, TRUE, status) == FALSE) {
909 return regexp->fMatcher->regionEnd();
921 RegularExpression *regexp = (RegularExpression*)regexp2;
922 if (validateRE(regexp, FALSE, status) == FALSE) {
925 return regexp->fMatcher->hasTransparentBounds();
938 RegularExpression *regexp = (RegularExpression*)regexp2;
939 if (validateRE(regexp, FALSE, status) == FALSE) {
942 regexp->fMatcher->useTransparentBounds(b);
954 RegularExpression *regexp = (RegularExpression*)regexp2;
955 if (validateRE(regexp, FALSE, status) == FALSE) {
958 return regexp->fMatcher->hasAnchoringBounds();
971 RegularExpression *regexp = (RegularExpression*)regexp2;
972 if (validateRE(regexp, FALSE, status) == FALSE) {
975 regexp->fMatcher->useAnchoringBounds(b);
987 RegularExpression *regexp = (RegularExpression*)regexp2;
988 if (validateRE(regexp, TRUE, status) == FALSE) {
991 return regexp->fMatcher->hitEnd();
1003 RegularExpression *regexp = (RegularExpression*)regexp2;
1004 if (validateRE(regexp, TRUE, status) == FALSE) {
1007 return regexp->fMatcher->requireEnd();
1020 RegularExpression *regexp = (RegularExpression*)regexp2;
1021 if (validateRE(regexp, FALSE, status)) {
1022 regexp->fMatcher->setTimeLimit(limit, *status);
1037 RegularExpression *regexp = (RegularExpression*)regexp2;
1038 if (validateRE(regexp, FALSE, status)) {
1039 retVal = regexp->fMatcher->getTimeLimit();
1055 RegularExpression *regexp = (RegularExpression*)regexp2;
1056 if (validateRE(regexp, FALSE, status)) {
1057 regexp->fMatcher->setStackLimit(limit, *status);
1072 RegularExpression *regexp = (RegularExpression*)regexp2;
1073 if (validateRE(regexp, FALSE, status)) {
1074 retVal = regexp->fMatcher->getStackLimit();
1090 RegularExpression *regexp = (RegularExpression*)regexp2;
1091 if (validateRE(regexp, FALSE, status)) {
1092 regexp->fMatcher->setMatchCallback(callback, context, *status);
1107 RegularExpression *regexp = (RegularExpression*)regexp2;
1108 if (validateRE(regexp, FALSE, status)) {
1109 regexp->fMatcher->getMatchCallback(*callback, *context, *status);
1124 RegularExpression *regexp = (RegularExpression*)regexp2;
1125 if (validateRE(regexp, FALSE, status)) {
1126 regexp->fMatcher->setFindProgressCallback(callback, context, *status);
1141 RegularExpression *regexp = (RegularExpression*)regexp2;
1142 if (validateRE(regexp, FALSE, status)) {
1143 regexp->fMatcher->getFindProgressCallback(*callback, *context, *status);
1160 RegularExpression *regexp = (RegularExpression*)regexp2;
1161 if (validateRE(regexp, TRUE, status) == FALSE) {
1208 RegularExpression *regexp = (RegularExpression*)regexp2;
1209 if (validateRE(regexp, TRUE, status) == FALSE) {
1217 dest = regexp->fMatcher->replaceAll(replacementText, dest, *status);
1234 RegularExpression *regexp = (RegularExpression*)regexp2;
1235 if (validateRE(regexp, TRUE, status) == FALSE) {
1269 RegularExpression *regexp = (RegularExpression*)regexp2;
1270 if (validateRE(regexp, TRUE, status) == FALSE) {
1278 dest = regexp->fMatcher->replaceFirst(replacementText, dest, *status);
1296 inline static int32_t appendReplacement(RegularExpression *regexp,
1303 inline static int32_t appendTail(RegularExpression *regexp,
1308 inline static int32_t split(RegularExpression *regexp,
1340 int32_t RegexCImpl::appendReplacement(RegularExpression *regexp,
1359 if (validateRE(regexp, TRUE, status) == FALSE) {
1370 RegexMatcher *m = regexp->fMatcher;
1389 if (regexp->fText != NULL) {
1403 appendToBuf(regexp->fText[i], &destIdx, dest, capacity);
1498 destIdx += uregex_group((URegularExpression*)regexp, groupNum, &dest[destIdx], REMAINING_CAPACITY(destIdx, capacity), status);
1559 RegularExpression *regexp = (RegularExpression*)regexp2;
1561 regexp, replacementText, replacementLength,destBuf, destCapacity, status);
1572 RegularExpression *regexp = (RegularExpression*)regexp2;
1573 regexp->fMatcher->appendReplacement(dest, replText, *status);
1582 int32_t RegexCImpl::appendTail(RegularExpression *regexp,
1597 if (validateRE(regexp, TRUE, status) == FALSE) {
1609 RegexMatcher *m = regexp->fMatcher;
1615 if (regexp->fText != NULL) {
1628 if (srcIdx == regexp->fTextLength) {
1631 UChar c = regexp->fText[srcIdx];
1632 if (c == 0 && regexp->fTextLength == -1) {
1633 regexp->fTextLength = srcIdx;
1642 if (regexp->fTextLength > 0) {
1643 destIdx += (regexp->fTextLength - srcIdx);
1709 RegularExpression *regexp = (RegularExpression*)regexp2;
1710 return RegexCImpl::appendTail(regexp, destBuf, destCapacity, status);
1721 RegularExpression *regexp = (RegularExpression*)regexp2;
1722 return regexp->fMatcher->appendTail(dest, *status);
1769 int32_t RegexCImpl::split(RegularExpression *regexp,
1779 regexp->fMatcher->reset();
1780 UText *inputText = regexp->fMatcher->fInputText;
1782 int64_t inputLen = regexp->fMatcher->fInputLength;
1792 int32_t numCaptureGroups = regexp->fMatcher->groupCount();
1817 if (regexp->fMatcher->find()) {
1822 destIdx += 1 + utext_extract(inputText, nextOutputStringStart, regexp->fMatcher->fMatchStart,
1829 nextOutputStringStart = regexp->fMatcher->fMatchEnd;
1844 int32_t t = uregex_group((URegularExpression*)regexp,
1912 RegularExpression *regexp = (RegularExpression*)regexp2;
1913 if (validateRE(regexp, TRUE, status) == FALSE) {
1924 return RegexCImpl::split(regexp, destBuf, destCapacity, requiredCapacity, destFields, destFieldsCapacity, status);
1936 RegularExpression *regexp = (RegularExpression*)regexp2;
1937 return regexp->fMatcher->split(regexp->fMatcher->inputText(), destFields, destFieldsCapacity, *status);