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