Lines Matching refs:regexp
326 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_pattern() local
328 if (validateRE(regexp, false, status) == false) { in uregex_pattern()
332 *patLength = regexp->fPatStringLen; in uregex_pattern()
334 return regexp->fPatString; in uregex_pattern()
346 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_patternUText() local
347 return regexp->fPat->patternText(*status); in uregex_patternUText()
358 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_flags() local
359 if (validateRE(regexp, false, status) == false) { in uregex_flags()
362 int32_t flags = regexp->fPat->flags(); in uregex_flags()
377 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_setText() local
378 if (validateRE(regexp, false, status) == false) { in uregex_setText()
386 if (regexp->fOwnsText && regexp->fText != nullptr) { in uregex_setText()
387 uprv_free((void *)regexp->fText); in uregex_setText()
390 regexp->fText = text; in uregex_setText()
391 regexp->fTextLength = textLength; in uregex_setText()
392 regexp->fOwnsText = false; in uregex_setText()
396 regexp->fMatcher->reset(&input); in uregex_setText()
410 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_setUText() local
411 if (validateRE(regexp, false, status) == false) { in uregex_setUText()
419 if (regexp->fOwnsText && regexp->fText != nullptr) { in uregex_setUText()
420 uprv_free((void *)regexp->fText); in uregex_setUText()
423 regexp->fText = nullptr; // only fill it in on request in uregex_setUText()
424 regexp->fTextLength = -1; in uregex_setUText()
425 regexp->fOwnsText = true; in uregex_setUText()
426 regexp->fMatcher->reset(text); in uregex_setUText()
440 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_getText() local
441 if (validateRE(regexp, false, status) == false) { in uregex_getText()
445 if (regexp->fText == nullptr) { in uregex_getText()
447 UText *inputText = regexp->fMatcher->inputText(); in uregex_getText()
450 regexp->fText = inputText->chunkContents; in uregex_getText()
451 regexp->fTextLength = (int32_t)inputNativeLength; in uregex_getText()
452 regexp->fOwnsText = false; // because the UText owns it in uregex_getText()
455 …regexp->fTextLength = utext_extract(inputText, 0, inputNativeLength, nullptr, 0, &lengthStatus); /… in uregex_getText()
456 … char16_t *inputChars = (char16_t *)uprv_malloc(sizeof(char16_t)*(regexp->fTextLength+1)); in uregex_getText()
458 … utext_extract(inputText, 0, inputNativeLength, inputChars, regexp->fTextLength+1, status); in uregex_getText()
459 regexp->fText = inputChars; in uregex_getText()
460 regexp->fOwnsText = true; // should already be set but just in case in uregex_getText()
465 *textLength = regexp->fTextLength; in uregex_getText()
467 return regexp->fText; in uregex_getText()
480 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_getUText() local
481 if (validateRE(regexp, false, status) == false) { in uregex_getUText()
484 return regexp->fMatcher->getInput(dest, *status); in uregex_getUText()
497 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_refreshUText() local
498 if (validateRE(regexp, false, status) == false) { in uregex_refreshUText()
501 regexp->fMatcher->refreshInputText(text, *status); in uregex_refreshUText()
521 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_matches64() local
523 if (validateRE(regexp, true, status) == false) { in uregex_matches64()
527 result = regexp->fMatcher->matches(*status); in uregex_matches64()
529 result = regexp->fMatcher->matches(startIndex, *status); in uregex_matches64()
551 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_lookingAt64() local
553 if (validateRE(regexp, true, status) == false) { in uregex_lookingAt64()
557 result = regexp->fMatcher->lookingAt(*status); in uregex_lookingAt64()
559 result = regexp->fMatcher->lookingAt(startIndex, *status); in uregex_lookingAt64()
582 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_find64() local
584 if (validateRE(regexp, true, status) == false) { in uregex_find64()
588 regexp->fMatcher->resetPreserveRegion(); in uregex_find64()
589 result = regexp->fMatcher->find(*status); in uregex_find64()
591 result = regexp->fMatcher->find(startIndex, *status); in uregex_find64()
605 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_findNext() local
606 if (validateRE(regexp, true, status) == false) { in uregex_findNext()
609 UBool result = regexp->fMatcher->find(*status); in uregex_findNext()
621 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_groupCount() local
622 if (validateRE(regexp, false, status) == false) { in uregex_groupCount()
625 int32_t result = regexp->fMatcher->groupCount(); in uregex_groupCount()
640 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_groupNumberFromName() local
641 if (validateRE(regexp, false, status) == false) { in uregex_groupNumberFromName()
644 …int32_t result = regexp->fPat->groupNumberFromName(UnicodeString(groupName, nameLength), *status); in uregex_groupNumberFromName()
653 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_groupNumberFromCName() local
654 if (validateRE(regexp, false, status) == false) { in uregex_groupNumberFromCName()
657 return regexp->fPat->groupNumberFromName(groupName, nameLength, *status); in uregex_groupNumberFromCName()
671 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_group() local
672 if (validateRE(regexp, true, status) == false) { in uregex_group()
680 if (destCapacity == 0 || regexp->fText != nullptr) { in uregex_group()
687 int32_t startIx = regexp->fMatcher->start(groupNum, *status); in uregex_group()
688 int32_t endIx = regexp->fMatcher->end (groupNum, *status); in uregex_group()
711 u_memcpy(dest, ®exp->fText[startIx], copyLength); in uregex_group()
715 int64_t start = regexp->fMatcher->start64(groupNum, *status); in uregex_group()
716 int64_t limit = regexp->fMatcher->end64(groupNum, *status); in uregex_group()
723 …int32_t length = utext_extract(regexp->fMatcher->inputText(), start, limit, dest, destCapacity, st… in uregex_group()
741 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_groupUText() local
742 if (validateRE(regexp, true, status) == false) { in uregex_groupUText()
747 return regexp->fMatcher->group(groupNum, dest, *groupLength, *status); in uregex_groupUText()
766 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_start64() local
767 if (validateRE(regexp, true, status) == false) { in uregex_start64()
770 int64_t result = regexp->fMatcher->start64(groupNum, *status); in uregex_start64()
790 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_end64() local
791 if (validateRE(regexp, true, status) == false) { in uregex_end64()
794 int64_t result = regexp->fMatcher->end64(groupNum, *status); in uregex_end64()
814 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_reset64() local
815 if (validateRE(regexp, true, status) == false) { in uregex_reset64()
818 regexp->fMatcher->reset(index, *status); in uregex_reset64()
840 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_setRegion64() local
841 if (validateRE(regexp, true, status) == false) { in uregex_setRegion64()
844 regexp->fMatcher->region(regionStart, regionLimit, *status); in uregex_setRegion64()
859 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_setRegionAndStart() local
860 if (validateRE(regexp, true, status) == false) { in uregex_setRegionAndStart()
863 regexp->fMatcher->region(regionStart, regionLimit, startIndex, *status); in uregex_setRegionAndStart()
880 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_regionStart64() local
881 if (validateRE(regexp, true, status) == false) { in uregex_regionStart64()
884 return regexp->fMatcher->regionStart(); in uregex_regionStart64()
902 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_regionEnd64() local
903 if (validateRE(regexp, true, status) == false) { in uregex_regionEnd64()
906 return regexp->fMatcher->regionEnd(); in uregex_regionEnd64()
918 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_hasTransparentBounds() local
919 if (validateRE(regexp, false, status) == false) { in uregex_hasTransparentBounds()
922 return regexp->fMatcher->hasTransparentBounds(); in uregex_hasTransparentBounds()
935 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_useTransparentBounds() local
936 if (validateRE(regexp, false, status) == false) { in uregex_useTransparentBounds()
939 regexp->fMatcher->useTransparentBounds(b); in uregex_useTransparentBounds()
951 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_hasAnchoringBounds() local
952 if (validateRE(regexp, false, status) == false) { in uregex_hasAnchoringBounds()
955 return regexp->fMatcher->hasAnchoringBounds(); in uregex_hasAnchoringBounds()
968 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_useAnchoringBounds() local
969 if (validateRE(regexp, false, status) == false) { in uregex_useAnchoringBounds()
972 regexp->fMatcher->useAnchoringBounds(b); in uregex_useAnchoringBounds()
984 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_hitEnd() local
985 if (validateRE(regexp, true, status) == false) { in uregex_hitEnd()
988 return regexp->fMatcher->hitEnd(); in uregex_hitEnd()
1000 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_requireEnd() local
1001 if (validateRE(regexp, true, status) == false) { in uregex_requireEnd()
1004 return regexp->fMatcher->requireEnd(); in uregex_requireEnd()
1017 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_setTimeLimit() local
1018 if (validateRE(regexp, false, status)) { in uregex_setTimeLimit()
1019 regexp->fMatcher->setTimeLimit(limit, *status); in uregex_setTimeLimit()
1034 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_getTimeLimit() local
1035 if (validateRE(regexp, false, status)) { in uregex_getTimeLimit()
1036 retVal = regexp->fMatcher->getTimeLimit(); in uregex_getTimeLimit()
1052 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_setStackLimit() local
1053 if (validateRE(regexp, false, status)) { in uregex_setStackLimit()
1054 regexp->fMatcher->setStackLimit(limit, *status); in uregex_setStackLimit()
1069 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_getStackLimit() local
1070 if (validateRE(regexp, false, status)) { in uregex_getStackLimit()
1071 retVal = regexp->fMatcher->getStackLimit(); in uregex_getStackLimit()
1087 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_setMatchCallback() local
1088 if (validateRE(regexp, false, status)) { in uregex_setMatchCallback()
1089 regexp->fMatcher->setMatchCallback(callback, context, *status); in uregex_setMatchCallback()
1104 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_getMatchCallback() local
1105 if (validateRE(regexp, false, status)) { in uregex_getMatchCallback()
1106 regexp->fMatcher->getMatchCallback(*callback, *context, *status); in uregex_getMatchCallback()
1121 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_setFindProgressCallback() local
1122 if (validateRE(regexp, false, status)) { in uregex_setFindProgressCallback()
1123 regexp->fMatcher->setFindProgressCallback(callback, context, *status); in uregex_setFindProgressCallback()
1138 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_getFindProgressCallback() local
1139 if (validateRE(regexp, false, status)) { in uregex_getFindProgressCallback()
1140 regexp->fMatcher->getFindProgressCallback(*callback, *context, *status); in uregex_getFindProgressCallback()
1157 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_replaceAll() local
1158 if (validateRE(regexp, true, status) == false) { in uregex_replaceAll()
1205 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_replaceAllUText() local
1206 if (validateRE(regexp, true, status) == false) { in uregex_replaceAllUText()
1214 dest = regexp->fMatcher->replaceAll(replacementText, dest, *status); in uregex_replaceAllUText()
1231 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_replaceFirst() local
1232 if (validateRE(regexp, true, status) == false) { in uregex_replaceFirst()
1266 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_replaceFirstUText() local
1267 if (validateRE(regexp, true, status) == false) { in uregex_replaceFirstUText()
1275 dest = regexp->fMatcher->replaceFirst(replacementText, dest, *status); in uregex_replaceFirstUText()
1293 inline static int32_t appendReplacement(RegularExpression *regexp,
1300 inline static int32_t appendTail(RegularExpression *regexp,
1305 inline static int32_t split(RegularExpression *regexp,
1339 int32_t RegexCImpl::appendReplacement(RegularExpression *regexp, in appendReplacement() argument
1358 if (validateRE(regexp, true, status) == false) { in appendReplacement()
1369 RegexMatcher *m = regexp->fMatcher; in appendReplacement()
1388 if (regexp->fText != nullptr) { in appendReplacement()
1402 appendToBuf(regexp->fText[i], &destIdx, dest, capacity); in appendReplacement()
1511 groupNum = regexp->fPat->fNamedCaptureMap ? in appendReplacement()
1512 uhash_geti(regexp->fPat->fNamedCaptureMap, &groupName) : 0; in appendReplacement()
1530 destIdx += uregex_group((URegularExpression*)regexp, groupNum, in appendReplacement()
1594 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_appendReplacement() local
1596 regexp, replacementText, replacementLength,destBuf, destCapacity, status); in uregex_appendReplacement()
1607 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_appendReplacementUText() local
1608 regexp->fMatcher->appendReplacement(dest, replText, *status); in uregex_appendReplacementUText()
1617 int32_t RegexCImpl::appendTail(RegularExpression *regexp, in appendTail() argument
1632 if (validateRE(regexp, true, status) == false) { in appendTail()
1644 RegexMatcher *m = regexp->fMatcher; in appendTail()
1650 if (regexp->fText != nullptr) { in appendTail()
1665 if (srcIdx == regexp->fTextLength) { in appendTail()
1668 char16_t c = regexp->fText[srcIdx]; in appendTail()
1669 if (c == 0 && regexp->fTextLength == -1) { in appendTail()
1670 regexp->fTextLength = srcIdx; in appendTail()
1680 if (regexp->fTextLength > 0) { in appendTail()
1681 destIdx += (regexp->fTextLength - srcIdx); in appendTail()
1747 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_appendTail() local
1748 return RegexCImpl::appendTail(regexp, destBuf, destCapacity, status); in uregex_appendTail()
1759 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_appendTailUText() local
1760 return regexp->fMatcher->appendTail(dest, *status); in uregex_appendTailUText()
1807 int32_t RegexCImpl::split(RegularExpression *regexp, in split() argument
1817 regexp->fMatcher->reset(); in split()
1818 UText *inputText = regexp->fMatcher->fInputText; in split()
1820 int64_t inputLen = regexp->fMatcher->fInputLength; in split()
1830 int32_t numCaptureGroups = regexp->fMatcher->groupCount(); in split()
1855 if (regexp->fMatcher->find()) { in split()
1860 … destIdx += 1 + utext_extract(inputText, nextOutputStringStart, regexp->fMatcher->fMatchStart, in split()
1867 nextOutputStringStart = regexp->fMatcher->fMatchEnd; in split()
1882 int32_t t = uregex_group((URegularExpression*)regexp, in split()
1950 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_split() local
1951 if (validateRE(regexp, true, status) == false) { in uregex_split()
1962 …return RegexCImpl::split(regexp, destBuf, destCapacity, requiredCapacity, destFields, destFieldsCa… in uregex_split()
1974 RegularExpression *regexp = (RegularExpression*)regexp2; in uregex_splitUText() local
1975 …return regexp->fMatcher->split(regexp->fMatcher->inputText(), destFields, destFieldsCapacity, *sta… in uregex_splitUText()