Home
last modified time | relevance | path

Searched refs:matcher (Results 1 – 25 of 45) sorted by relevance

12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/regex/
DPattern2Test.java33 Matcher m1 = p.matcher("foo123"); in testSimpleMatch()
38 Matcher m2 = p.matcher("fox"); in testSimpleMatch()
58 m = p.matcher("foobar"); in testCursors()
112 m = p.matcher("p1#q3p2q42p5p71p63#q888"); in testGroups()
167 m = p.matcher("aabfooaabfooabfoob"); in testReplace()
181 m = p.matcher("Byte for byte"); in testReplace()
187 m = p.matcher("card #1234-5678-1234"); in testReplace()
193 m = p.matcher("left right, up down"); in testReplace()
199 m = p.matcher("I want cheese. Please."); in testReplace()
212 m = p.matcher("fred\\ginger;abbott\\costello;jekell\\hyde;"); in testEscapes()
[all …]
DMatcherTest.java45 Matcher m = p.matcher("axxxxxa"); in testRegionsIntInt()
80 Matcher m = pat.matcher("Today is XX-XX-XX ..."); in testAppendReplacement()
92 Matcher m = p.matcher("xx $ equals to xx rur."); in testAppendReplacementRef()
106 Matcher mat = pat.matcher(input); in testReplaceAll()
113 Matcher m = p.matcher("abcd"); in testResetCharSequence()
127 Matcher m = p.matcher("one\\cat\\two\\cats\\in\\the\\yard"); in testAppendSlashes()
141 Matcher mat = pat.matcher(input); in testReplaceFirst()
147 Matcher matcher = Pattern.compile("Hello").matcher("Hello, world!"); in testReplaceFirst_null_match() local
149 matcher.replaceFirst(null); in testReplaceFirst_null_match()
156 Matcher matcher = Pattern.compile("not found").matcher("Hello, world!"); in testReplaceFirst_null_nomatch() local
[all …]
DModeTest.java36 m = p.matcher("cAT123#dog345"); in testCase()
43 m = p.matcher("cAt123#doG345"); in testCase()
52 m = p.matcher("cAt123#doG345"); in testCase()
65 m = p.matcher("foobar"); in testMultiline()
70 m = p.matcher("barfoo"); in testMultiline()
75 m = p.matcher("foobar"); in testMultiline()
78 m = p.matcher("barfoo"); in testMultiline()
85 m = p.matcher("foo1bar\nfoo2foo3\nbarfoo4"); in testMultiline()
94 m = p.matcher("foo1bar\nfoo2foo3\nbarfoo4"); in testMultiline()
103 m = p.matcher("foo1bar\nfoo2foo3\nbarfoo4"); in testMultiline()
[all …]
DMatcher2Test.java32 Matcher m = p.matcher("bar"); in test_toString()
39 Matcher m = p.matcher("bar"); in testErrorConditions()
90 Matcher m = p.matcher("foo1barzfoo2baryfoozbar5"); in testErrorConditions2()
224 Matcher mat = pat.matcher(str); in testReplacementBackSlash()
233 Matcher matcher = Pattern.compile("Hello").matcher("Hello, world!"); in testAppendReplacement_replacementEndsWithBackslash() local
234 matcher.find(); in testAppendReplacement_replacementEndsWithBackslash()
236 matcher.appendReplacement(new StringBuffer(), "replacement\\"); in testAppendReplacement_replacementEndsWithBackslash()
243 Matcher matcher = Pattern.compile("Hello").matcher("Hello, world!"); in testAppendReplacement_replacementEndsWithDollar() local
244 matcher.find(); in testAppendReplacement_replacementEndsWithDollar()
246 matcher.appendReplacement(new StringBuffer(), "replacement$"); in testAppendReplacement_replacementEndsWithDollar()
DReplaceTest.java36 Matcher m = p.matcher(target); in testSimpleReplace()
52 m = p.matcher(target); in testCaptureReplace()
62 m = p.matcher(target); in testCaptureReplace()
/libcore/luni/src/test/java/org/apache/harmony/regex/tests/java/util/regex/
DPattern2Test.java119 "by pattern '"+pat, p.matcher(t).matches()); in testCategory()
121 "be matched by pattern '"+npat, pn.matcher(t).matches()); in testCategory()
124 "by pattern '"+pat, p.matcher(t).matches()); in testCategory()
126 "not be matched by pattern '"+npat, pn.matcher(t).matches()); in testCategory()
137 m = p.matcher("aaaaaaaab"); in testCapturingGroups()
143 m = p.matcher("ananas"); in testCapturingGroups()
154 m = p.matcher("ananas"); in testCapturingGroups()
173 m = p.matcher("ananasanan"); in testCapturingGroups()
190 m = p.matcher("abcc"); in testRepeats()
192 m = p.matcher("c"); in testRepeats()
[all …]
DPatternTest.java84 assertNotNull(p.matcher("bcde")); in testMatcher()
85 assertNotSame(p.matcher("a"), p.matcher("a")); in testMatcher()
296 Matcher mat = pat.matcher(testString); in testFlagsCase1()
304 Matcher mat = pat.matcher(testString); in testFlagsCase2()
312 Matcher mat = pat.matcher(testString); in testFlagsCase3()
320 Matcher mat = pat.matcher(testString); in testFlagsCase4()
328 Matcher mat = pat.matcher(testString); in testFlagsCase5()
336 Matcher mat = pat.matcher(testString); in testFlagsCase6()
344 Matcher mat = pat.matcher(testString); in testFlagsCase7()
352 Matcher mat = pat.matcher(testString); in testFlagsCase8()
[all …]
/libcore/luni/src/test/java/libcore/java/util/regex/
DOldMatcherTest.java32 Matcher m = pat.matcher("Today is XX-XX-XX ..."); in testAppendReplacement()
42 m = pat.matcher("one-cat-two-cats-in-the-yard"); in testAppendReplacement()
67 Matcher mat = pat.matcher(testString1); in test_resetLjava_lang_String()
78 Matcher m = p.matcher("one-cat-two-cats-in-the-yard"); in testAppendTail()
87 m = p.matcher("one-cat-two-cats-in-the-yard"); in testAppendTail()
97 m = p.matcher("one-cat-two-cats-in-the-yard"); in testAppendTail()
115 Matcher mat = pat.matcher(testString); in test_reset()
126 Matcher mat = pat.matcher(testString); in test_hasAnchoringBounds()
144 Matcher mat = pat.matcher(testString); in test_hasTransparentBounds()
162 Matcher mat = pat.matcher(testString); in test_startI()
[all …]
DOldAndroidRegexTest.java28 Matcher m = p.matcher("bcd"); in testMatches()
33 m = p.matcher("abcdefg"); in testMatches()
37 m = p.matcher("bcdefg"); in testMatches()
41 m = p.matcher("abcd"); in testMatches()
46 m = p.matcher("abc"); in testMatches()
52 m = p.matcher("abc"); in testMatches()
89 Matcher m = p.matcher("1 (919) 555-1212"); in testGroupCount()
97 Matcher m = p.matcher("abcdefg"); in testGroups()
112 Matcher m = p.matcher("abc"); in testFind()
129 Matcher m = p.matcher("fooaabfooaabfooabfoob"); in testReplaceAll()
[all …]
/libcore/ojluni/src/main/java/java/util/
DScanner.java317 private Matcher matcher; field in Scanner
546 matcher = delimPattern.matcher(buf); in Scanner()
547 matcher.useTransparentBounds(true); in Scanner()
548 matcher.useAnchoringBounds(false); in Scanner()
771 hasNextResult = matcher.group(); in cacheResult()
772 hasNextPosition = matcher.end(); in cacheResult()
773 hasNextPattern = matcher.pattern(); in cacheResult()
778 hasNextPosition = matcher.end(); in cacheResult()
779 hasNextPattern = matcher.pattern(); in cacheResult()
837 matcher.reset(buf); in readInput()
[all …]
/libcore/ojluni/src/main/java/sun/security/util/
DDebug.java252 Matcher matcher = pattern.matcher(source); in marshal() local
254 while (matcher.find()) { in marshal()
255 String matched = matcher.group(); in marshal()
260 matcher.appendReplacement(left, ""); in marshal()
262 matcher.appendTail(left); in marshal()
276 matcher = pattern.matcher(source); in marshal()
278 while (matcher.find()) { in marshal()
279 String matched = matcher.group(); in marshal()
284 matcher.appendReplacement(left, ""); in marshal()
286 matcher.appendTail(left); in marshal()
DDisabledAlgorithmConstraints.java279 Matcher matcher = keySizePattern.matcher(entry); in Constraints() local
280 if (matcher.matches()) { in Constraints()
286 KeySizeConstraint.Operator.of(matcher.group(1)), in Constraints()
287 Integer.parseInt(matcher.group(2))); in Constraints()
/libcore/benchmarks/src/benchmarks/regression/
DSchemePrefixBenchmark.java60 Matcher matcher = pattern.matcher(spec); in REGEX() local
61 if (matcher.find()) { in REGEX()
62 return matcher.group(1).toLowerCase(Locale.US); in REGEX()
/libcore/ojluni/src/main/java/java/util/regex/
DPattern.java1030 public Matcher matcher(CharSequence input) { in matcher() method in Pattern
1081 Matcher m = p.matcher(input); in matches()
1162 Matcher m = matcher(input); in split()
1457 return s -> matcher(s).find(); in asPredicate()
1494 private final Matcher matcher; in splitAsStream() field in Pattern.MatcherIterator
1504 this.matcher = matcher(input); in splitAsStream()
1530 while (matcher.find()) { in splitAsStream()
1531 nextElement = input.subSequence(current, matcher.start()).toString(); in splitAsStream()
1532 current = matcher.end(); in splitAsStream()
/libcore/ojluni/src/main/java/java/time/
DPeriod.java321 Matcher matcher = PATTERN.matcher(text); in parse() local
322 if (matcher.matches()) { in parse()
323 int negate = (charMatch(text, matcher.start(1), matcher.end(1), '-') ? -1 : 1); in parse()
324 int yearStart = matcher.start(2), yearEnd = matcher.end(2); in parse()
325 int monthStart = matcher.start(3), monthEnd = matcher.end(3); in parse()
326 int weekStart = matcher.start(4), weekEnd = matcher.end(4); in parse()
327 int dayStart = matcher.start(5), dayEnd = matcher.end(5); in parse()
DDuration.java384 Matcher matcher = PATTERN.matcher(text); in parse() local
385 if (matcher.matches()) { in parse()
387 if ("T".equals(matcher.group(3)) == false) { in parse()
388 boolean negate = "-".equals(matcher.group(1)); in parse()
389 String dayMatch = matcher.group(2); in parse()
390 String hourMatch = matcher.group(4); in parse()
391 String minuteMatch = matcher.group(5); in parse()
392 String secondMatch = matcher.group(6); in parse()
393 String fractionMatch = matcher.group(7); in parse()
/libcore/ojluni/src/tools/build/tools/spp/
DSpp.java108 final Matcher ifkey = Pattern.compile("^#if\\[(!)?" + KEY + "\\]").matcher("");
109 final Matcher elsekey = Pattern.compile("^#else\\[(!)?" + KEY + "\\]").matcher("");
110 final Matcher endkey = Pattern.compile("^#end\\[(!)?" + KEY + "\\]").matcher("");
111 …pile("\\{#if\\[(!)?" + KEY + "\\]\\?" + TEXT + "(:"+ TEXT + ")?\\}|\\$" + VAR + "\\$").matcher("");
112 final Matcher vardef2 = Pattern.compile("\\$" + VAR + "\\$").matcher("");
/libcore/ojluni/src/main/java/javax/net/ssl/
DSSLParameters.java395 for (SNIMatcher matcher : matchers) { in setSNIMatchers()
396 if (sniMatchers.put(matcher.getType(), in setSNIMatchers()
397 matcher) != null) { in setSNIMatchers()
400 matcher.getType()); in setSNIMatchers()
DSNIHostName.java387 if (pattern.matcher(asciiName).matches()) { in matches()
393 return pattern.matcher(IDN.toUnicode(asciiName)).matches(); in matches()
/libcore/tools/upstream/src/main/java/libcore/
DCompareUpstreams.java97 Matcher matcher = pattern.matcher(line); in androidChangedComments() local
98 if (matcher.find()) { in androidChangedComments()
99 String type = matcher.group(1); in androidChangedComments()
103 String match = matcher.group(2); in androidChangedComments()
DRepository.java281 Matcher matcher = pattern.matcher(line); in loadOrderedRelPathsSetFromBlueprint() local
282 while (matcher.find()) { in loadOrderedRelPathsSetFromBlueprint()
283 Path relPath = Paths.get(matcher.group(1)); in loadOrderedRelPathsSetFromBlueprint()
/libcore/metrictests/memory/apps/src/libcore/heapdumper/
DActions.java75 Matcher m = p.matcher(sequence); in run()
/libcore/luni/src/test/java/libcore/java/lang/
DProcessBuilderTest.java530 Matcher matcher = Pattern.compile("pid=(\\d+)").matcher(process.toString()); in getChildProcessPid() local
531 assertTrue("Can't find PID in: " + process, matcher.find()); in getChildProcessPid()
532 int result = Integer.parseInt(matcher.group(1)); in getChildProcessPid()
/libcore/ojluni/annotations/sdk/nullability/java/util/regex/
DPattern.annotated.java44 @libcore.util.NonNull public java.util.regex.Matcher matcher(@libcore.util.NonNull java.lang.CharSe… in matcher() method in Pattern
/libcore/tools/testmapping/
Dgen_smoke_tests.py106 def match(matcher, got_source, message): argument
117 (want_source, pattern) = matcher

12