Lines Matching full:regexp
324 RegularExpression *regexp = (RegularExpression*)regexp2;
326 if (validateRE(regexp, FALSE, status) == FALSE) {
330 *patLength = regexp->fPatStringLen;
332 return regexp->fPatString;
344 RegularExpression *regexp = (RegularExpression*)regexp2;
345 return regexp->fPat->patternText(*status);
356 RegularExpression *regexp = (RegularExpression*)regexp2;
357 if (validateRE(regexp, FALSE, status) == FALSE) {
360 int32_t flags = regexp->fPat->flags();
375 RegularExpression *regexp = (RegularExpression*)regexp2;
376 if (validateRE(regexp, FALSE, status) == FALSE) {
384 if (regexp->fOwnsText && regexp->fText != NULL) {
385 uprv_free((void *)regexp->fText);
388 regexp->fText = text;
389 regexp->fTextLength = textLength;
390 regexp->fOwnsText = FALSE;
394 regexp->fMatcher->reset(&input);
408 RegularExpression *regexp = (RegularExpression*)regexp2;
409 if (validateRE(regexp, FALSE, status) == FALSE) {
417 if (regexp->fOwnsText && regexp->fText != NULL) {
418 uprv_free((void *)regexp->fText);
421 regexp->fText = NULL; // only fill it in on request
422 regexp->fTextLength = -1;
423 regexp->fOwnsText = TRUE;
424 regexp->fMatcher->reset(text);
438 RegularExpression *regexp = (RegularExpression*)regexp2;
439 if (validateRE(regexp, FALSE, status) == FALSE) {
443 if (regexp->fText == NULL) {
445 UText *inputText = regexp->fMatcher->inputText();
448 regexp->fText = inputText->chunkContents;
449 regexp->fTextLength = (int32_t)inputNativeLength;
450 regexp->fOwnsText = FALSE; // because the UText owns it
453 regexp->fTextLength = utext_extract(inputText, 0, inputNativeLength, NULL, 0, &lengthStatus); // buffer overflow error
454 UChar *inputChars = (UChar *)uprv_malloc(sizeof(UChar)*(regexp->fTextLength+1));
456 utext_extract(inputText, 0, inputNativeLength, inputChars, regexp->fTextLength+1, status);
457 regexp->fText = inputChars;
458 regexp->fOwnsText = TRUE; // should already be set but just in case
463 *textLength = regexp->fTextLength;
465 return regexp->fText;
478 RegularExpression *regexp = (RegularExpression*)regexp2;
479 if (validateRE(regexp, FALSE, status) == FALSE) {
482 return regexp->fMatcher->getInput(dest, *status);
495 RegularExpression *regexp = (RegularExpression*)regexp2;
496 if (validateRE(regexp, FALSE, status) == FALSE) {
499 regexp->fMatcher->refreshInputText(text, *status);
519 RegularExpression *regexp = (RegularExpression*)regexp2;
521 if (validateRE(regexp, TRUE, status) == FALSE) {
525 result = regexp->fMatcher->matches(*status);
527 result = regexp->fMatcher->matches(startIndex, *status);
549 RegularExpression *regexp = (RegularExpression*)regexp2;
551 if (validateRE(regexp, TRUE, status) == FALSE) {
555 result = regexp->fMatcher->lookingAt(*status);
557 result = regexp->fMatcher->lookingAt(startIndex, *status);
580 RegularExpression *regexp = (RegularExpression*)regexp2;
582 if (validateRE(regexp, TRUE, status) == FALSE) {
586 regexp->fMatcher->resetPreserveRegion();
587 result = regexp->fMatcher->find(*status);
589 result = regexp->fMatcher->find(startIndex, *status);
603 RegularExpression *regexp = (RegularExpression*)regexp2;
604 if (validateRE(regexp, TRUE, status) == FALSE) {
607 UBool result = regexp->fMatcher->find(*status);
619 RegularExpression *regexp = (RegularExpression*)regexp2;
620 if (validateRE(regexp, FALSE, status) == FALSE) {
623 int32_t result = regexp->fMatcher->groupCount();
638 RegularExpression *regexp = (RegularExpression*)regexp2;
639 if (validateRE(regexp, FALSE, status) == FALSE) {
642 int32_t result = regexp->fPat->groupNumberFromName(UnicodeString(groupName, nameLength), *status);
651 RegularExpression *regexp = (RegularExpression*)regexp2;
652 if (validateRE(regexp, FALSE, status) == FALSE) {
655 return regexp->fPat->groupNumberFromName(groupName, nameLength, *status);
669 RegularExpression *regexp = (RegularExpression*)regexp2;
670 if (validateRE(regexp, TRUE, status) == FALSE) {
678 if (destCapacity == 0 || regexp->fText != NULL) {
685 int32_t startIx = regexp->fMatcher->start(groupNum, *status);
686 int32_t endIx = regexp->fMatcher->end (groupNum, *status);
709 u_memcpy(dest, ®exp->fText[startIx], copyLength);
713 int64_t start = regexp->fMatcher->start64(groupNum, *status);
714 int64_t limit = regexp->fMatcher->end64(groupNum, *status);
721 int32_t length = utext_extract(regexp->fMatcher->inputText(), start, limit, dest, destCapacity, status);
739 RegularExpression *regexp = (RegularExpression*)regexp2;
740 if (validateRE(regexp, TRUE, status) == FALSE) {
745 return regexp->fMatcher->group(groupNum, dest, *groupLength, *status);
764 RegularExpression *regexp = (RegularExpression*)regexp2;
765 if (validateRE(regexp, TRUE, status) == FALSE) {
768 int32_t result = regexp->fMatcher->start(groupNum, *status);
788 RegularExpression *regexp = (RegularExpression*)regexp2;
789 if (validateRE(regexp, TRUE, status) == FALSE) {
792 int32_t result = regexp->fMatcher->end(groupNum, *status);
812 RegularExpression *regexp = (RegularExpression*)regexp2;
813 if (validateRE(regexp, TRUE, status) == FALSE) {
816 regexp->fMatcher->reset(index, *status);
838 RegularExpression *regexp = (RegularExpression*)regexp2;
839 if (validateRE(regexp, TRUE, status) == FALSE) {
842 regexp->fMatcher->region(regionStart, regionLimit, *status);
857 RegularExpression *regexp = (RegularExpression*)regexp2;
858 if (validateRE(regexp, TRUE, status) == FALSE) {
861 regexp->fMatcher->region(regionStart, regionLimit, startIndex, *status);
878 RegularExpression *regexp = (RegularExpression*)regexp2;
879 if (validateRE(regexp, TRUE, status) == FALSE) {
882 return regexp->fMatcher->regionStart();
900 RegularExpression *regexp = (RegularExpression*)regexp2;
901 if (validateRE(regexp, TRUE, status) == FALSE) {
904 return regexp->fMatcher->regionEnd();
916 RegularExpression *regexp = (RegularExpression*)regexp2;
917 if (validateRE(regexp, FALSE, status) == FALSE) {
920 return regexp->fMatcher->hasTransparentBounds();
933 RegularExpression *regexp = (RegularExpression*)regexp2;
934 if (validateRE(regexp, FALSE, status) == FALSE) {
937 regexp->fMatcher->useTransparentBounds(b);
949 RegularExpression *regexp = (RegularExpression*)regexp2;
950 if (validateRE(regexp, FALSE, status) == FALSE) {
953 return regexp->fMatcher->hasAnchoringBounds();
966 RegularExpression *regexp = (RegularExpression*)regexp2;
967 if (validateRE(regexp, FALSE, status) == FALSE) {
970 regexp->fMatcher->useAnchoringBounds(b);
982 RegularExpression *regexp = (RegularExpression*)regexp2;
983 if (validateRE(regexp, TRUE, status) == FALSE) {
986 return regexp->fMatcher->hitEnd();
998 RegularExpression *regexp = (RegularExpression*)regexp2;
999 if (validateRE(regexp, TRUE, status) == FALSE) {
1002 return regexp->fMatcher->requireEnd();
1015 RegularExpression *regexp = (RegularExpression*)regexp2;
1016 if (validateRE(regexp, FALSE, status)) {
1017 regexp->fMatcher->setTimeLimit(limit, *status);
1032 RegularExpression *regexp = (RegularExpression*)regexp2;
1033 if (validateRE(regexp, FALSE, status)) {
1034 retVal = regexp->fMatcher->getTimeLimit();
1050 RegularExpression *regexp = (RegularExpression*)regexp2;
1051 if (validateRE(regexp, FALSE, status)) {
1052 regexp->fMatcher->setStackLimit(limit, *status);
1067 RegularExpression *regexp = (RegularExpression*)regexp2;
1068 if (validateRE(regexp, FALSE, status)) {
1069 retVal = regexp->fMatcher->getStackLimit();
1085 RegularExpression *regexp = (RegularExpression*)regexp2;
1086 if (validateRE(regexp, FALSE, status)) {
1087 regexp->fMatcher->setMatchCallback(callback, context, *status);
1102 RegularExpression *regexp = (RegularExpression*)regexp2;
1103 if (validateRE(regexp, FALSE, status)) {
1104 regexp->fMatcher->getMatchCallback(*callback, *context, *status);
1119 RegularExpression *regexp = (RegularExpression*)regexp2;
1120 if (validateRE(regexp, FALSE, status)) {
1121 regexp->fMatcher->setFindProgressCallback(callback, context, *status);
1136 RegularExpression *regexp = (RegularExpression*)regexp2;
1137 if (validateRE(regexp, FALSE, status)) {
1138 regexp->fMatcher->getFindProgressCallback(*callback, *context, *status);
1155 RegularExpression *regexp = (RegularExpression*)regexp2;
1156 if (validateRE(regexp, TRUE, status) == FALSE) {
1203 RegularExpression *regexp = (RegularExpression*)regexp2;
1204 if (validateRE(regexp, TRUE, status) == FALSE) {
1212 dest = regexp->fMatcher->replaceAll(replacementText, dest, *status);
1229 RegularExpression *regexp = (RegularExpression*)regexp2;
1230 if (validateRE(regexp, TRUE, status) == FALSE) {
1264 RegularExpression *regexp = (RegularExpression*)regexp2;
1265 if (validateRE(regexp, TRUE, status) == FALSE) {
1273 dest = regexp->fMatcher->replaceFirst(replacementText, dest, *status);
1291 inline static int32_t appendReplacement(RegularExpression *regexp,
1298 inline static int32_t appendTail(RegularExpression *regexp,
1303 inline static int32_t split(RegularExpression *regexp,
1337 int32_t RegexCImpl::appendReplacement(RegularExpression *regexp,
1356 if (validateRE(regexp, TRUE, status) == FALSE) {
1367 RegexMatcher *m = regexp->fMatcher;
1386 if (regexp->fText != NULL) {
1400 appendToBuf(regexp->fText[i], &destIdx, dest, capacity);
1507 groupNum = uhash_geti(regexp->fPat->fNamedCaptureMap, &groupName);
1525 destIdx += uregex_group((URegularExpression*)regexp, groupNum,
1589 RegularExpression *regexp = (RegularExpression*)regexp2;
1591 regexp, replacementText, replacementLength,destBuf, destCapacity, status);
1602 RegularExpression *regexp = (RegularExpression*)regexp2;
1603 regexp->fMatcher->appendReplacement(dest, replText, *status);
1612 int32_t RegexCImpl::appendTail(RegularExpression *regexp,
1627 if (validateRE(regexp, TRUE, status) == FALSE) {
1639 RegexMatcher *m = regexp->fMatcher;
1645 if (regexp->fText != NULL) {
1660 if (srcIdx == regexp->fTextLength) {
1663 UChar c = regexp->fText[srcIdx];
1664 if (c == 0 && regexp->fTextLength == -1) {
1665 regexp->fTextLength = srcIdx;
1675 if (regexp->fTextLength > 0) {
1676 destIdx += (regexp->fTextLength - srcIdx);
1742 RegularExpression *regexp = (RegularExpression*)regexp2;
1743 return RegexCImpl::appendTail(regexp, destBuf, destCapacity, status);
1754 RegularExpression *regexp = (RegularExpression*)regexp2;
1755 return regexp->fMatcher->appendTail(dest, *status);
1802 int32_t RegexCImpl::split(RegularExpression *regexp,
1812 regexp->fMatcher->reset();
1813 UText *inputText = regexp->fMatcher->fInputText;
1815 int64_t inputLen = regexp->fMatcher->fInputLength;
1825 int32_t numCaptureGroups = regexp->fMatcher->groupCount();
1850 if (regexp->fMatcher->find()) {
1855 destIdx += 1 + utext_extract(inputText, nextOutputStringStart, regexp->fMatcher->fMatchStart,
1862 nextOutputStringStart = regexp->fMatcher->fMatchEnd;
1877 int32_t t = uregex_group((URegularExpression*)regexp,
1945 RegularExpression *regexp = (RegularExpression*)regexp2;
1946 if (validateRE(regexp, TRUE, status) == FALSE) {
1957 return RegexCImpl::split(regexp, destBuf, destCapacity, requiredCapacity, destFields, destFieldsCapacity, status);
1969 RegularExpression *regexp = (RegularExpression*)regexp2;
1970 return regexp->fMatcher->split(regexp->fMatcher->inputText(), destFields, destFieldsCapacity, *status);