Home
last modified time | relevance | path

Searched refs:pat (Results 1 – 25 of 592) sorted by relevance

12345678910>>...24

/external/cronet/buildtools/third_party/libc++/trunk/test/std/re/re.const/re.matchflag/
Dmatch_multiline.pass.cpp21 static void search(const char* pat, std::regex_constants::syntax_option_type f, in search() argument
24 std::regex re(pat, f); in search()
50 const char* pat = "^foo"; in main() local
53 search(pat, ECMAScript, target, true); in main()
54 search(pat, basic, target, true); in main()
55 search(pat, extended, target, true); in main()
56 search(pat, awk, target, true); in main()
57 search(pat, grep, target, true); in main()
58 search(pat, egrep, target, true); in main()
60 search(pat, ECMAScript | multiline, target, true); in main()
[all …]
/external/icu/icu4j/perf-tests/
Ducharacterperf_r.pl39 my $pat = '0 ffff';
42 …"Digit ($pat)", ["$jvm1 Digit $pat" , "$jvm2 Digit $pat" …
43 …"GetNumericValue ($pat)", ["$jvm1 GetNumericValue $pat" , "$jvm2 GetNumericVa…
44 …"GetType ($pat)", ["$jvm1 GetType $pat" , "$jvm2 GetType $pat
45 …"IsDefined ($pat)", ["$jvm1 IsDefined $pat" , "$jvm2 IsDefined $p…
46 …"IsDigit ($pat)", ["$jvm1 IsDigit $pat" , "$jvm2 IsDigit $pat
47 …"IsIdentifierIgnorable ($pat)", ["$jvm1 IsIdentifierIgnorable $pat" , "$jvm2 IsIdentifier…
48 …"IsISOControl ($pat)", ["$jvm1 IsISOControl $pat" , "$jvm2 IsISOControl…
49 …"IsLetter ($pat)", ["$jvm1 IsLetter $pat" , "$jvm2 IsLetter $pa…
50 …"IsLetterOrDigit ($pat)", ["$jvm1 IsLetterOrDigit $pat" , "$jvm2 IsLetterOrDi…
[all …]
/external/curl/src/
Dtool_urlglob.c42 struct URLPattern *pat = &glob->pattern[glob->size]; in glob_fixed() local
43 pat->type = UPTSet; in glob_fixed()
44 pat->content.Set.size = 1; in glob_fixed()
45 pat->content.Set.ptr_s = 0; in glob_fixed()
46 pat->globindex = -1; in glob_fixed()
48 pat->content.Set.elements = malloc(sizeof(char *)); in glob_fixed()
50 if(!pat->content.Set.elements) in glob_fixed()
53 pat->content.Set.elements[0] = malloc(len + 1); in glob_fixed()
54 if(!pat->content.Set.elements[0]) in glob_fixed()
57 memcpy(pat->content.Set.elements[0], fixed, len); in glob_fixed()
[all …]
/external/musl/src/regex/
Dfnmatch.c49 static int pat_next(const char *pat, size_t m, size_t *step, int flags) in pat_next() argument
52 if (!m || !*pat) { in pat_next()
57 if (pat[0]=='\\' && pat[1] && !(flags & FNM_NOESCAPE)) { in pat_next()
59 pat++; in pat_next()
63 if (pat[0]=='[') { in pat_next()
65 if (k<m) if (pat[k] == '^' || pat[k] == '!') k++; in pat_next()
66 if (k<m) if (pat[k] == ']') k++; in pat_next()
67 for (; k<m && pat[k] && pat[k]!=']'; k++) { in pat_next()
68 if (k+1<m && pat[k+1] && pat[k]=='[' && (pat[k+1]==':' || pat[k+1]=='.' || pat[k+1]=='=')) { in pat_next()
69 int z = pat[k+1]; in pat_next()
[all …]
Dglob.c35 static int do_glob(char *buf, size_t pos, int type, char *pat, int flags, int (*errfunc)(const char… in do_glob() argument
42 if (*pat && type!=DT_DIR) type = 0; in do_glob()
43 while (pos+1 < PATH_MAX && *pat=='/') buf[pos++] = *pat++; in do_glob()
49 for (; pat[i]!='*' && pat[i]!='?' && (!in_bracket || pat[i]!=']'); i++) { in do_glob()
50 if (!pat[i]) { in do_glob()
52 pat += i; in do_glob()
56 } else if (pat[i] == '[') { in do_glob()
58 } else if (pat[i] == '\\' && !(flags & GLOB_NOESCAPE)) { in do_glob()
62 if (in_bracket && pat[i+1]==']') break; in do_glob()
64 if (!pat[i+1]) return 0; in do_glob()
[all …]
/external/rust/crates/os_str_bytes/src/
Draw_str.rs40 fn find(string: &[u8], pat: &[u8]) -> Option<usize> { in find()
41 (0..=string.len().checked_sub(pat.len())?) in find()
42 .find(|&x| string[x..].starts_with(pat)) in find()
46 fn rfind(string: &[u8], pat: &[u8]) -> Option<usize> { in rfind()
47 (pat.len()..=string.len()) in rfind()
48 .rfind(|&x| string[..x].ends_with(pat)) in rfind()
49 .map(|x| x - pat.len()) in rfind()
309 pub fn contains<P>(&self, pat: P) -> bool in contains()
313 self.find(pat).is_some() in contains()
329 pub fn ends_with<P>(&self, pat: P) -> bool in ends_with()
[all …]
/external/python/cpython2/Lib/
Dfnmatch.py24 def fnmatch(name, pat): argument
42 pat = os.path.normcase(pat)
43 return fnmatchcase(name, pat)
45 def filter(names, pat): argument
49 pat=os.path.normcase(pat)
51 re_pat = _cache[pat]
53 res = translate(pat)
56 _cache[pat] = re_pat = re.compile(res)
69 def fnmatchcase(name, pat): argument
77 re_pat = _cache[pat]
[all …]
/external/python/cpython3/Lib/
Dfnmatch.py25 def fnmatch(name, pat): argument
41 pat = os.path.normcase(pat)
42 return fnmatchcase(name, pat)
45 def _compile_pattern(pat): argument
46 if isinstance(pat, bytes):
47 pat_str = str(pat, 'ISO-8859-1')
51 res = translate(pat)
54 def filter(names, pat): argument
57 pat = os.path.normcase(pat)
58 match = _compile_pattern(pat)
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DIntlTestDecimalFormatAPI.java66 String pat = ",##0.0000"; in testJB1871() local
67 DecimalFormat dec = new DecimalFormat(pat); in testJB1871()
72 errln("Fail: " + number + " x \"" + pat + "\" = \"" + in testJB1871()
76 pat = ",##0.0001"; in testJB1871()
77 dec = new DecimalFormat(pat); in testJB1871()
81 errln("Fail: " + number + " x \"" + pat + "\" = \"" + in testJB1871()
86 pat = ",##0.00000000000000000001"; in testJB1871()
87 dec = new DecimalFormat(pat); in testJB1871()
94 errln("Fail: " + bignumber + " x \"" + pat + "\" = \"" + in testJB1871()
117 DecimalFormat pat = null; in TestAPI() local
[all …]
DNumberFormatTestCases.txt21 pat: - "0.####"
23 pat: - "0.####"
26 pat: - "0"
32 pat: - -
34 pat: - "#,@@@"
37 pat: - -
43 pat: - -
48 pat: - -
53 pat: - -
58 pat: - -
[all …]
DIntlTestDecimalFormatAPIC.java64 DecimalFormat pat = null; in TestAPI() local
66 pat = new DecimalFormat(pattern); in TestAPI()
118 res2 = pat.format(l, res2, pos2); in TestAPI()
134 pat.applyPattern(patt); in TestAPI()
135 double d2 = pat.parse(text, pos).doubleValue(); in TestAPI()
146 final DecimalFormatSymbols syms = pat.getDecimalFormatSymbols(); in TestAPI()
148 if (!pat.getDecimalFormatSymbols().equals(def.getDecimalFormatSymbols())) { in TestAPI()
153 pat.setPositivePrefix("+"); in TestAPI()
154 posPrefix = pat.getPositivePrefix(); in TestAPI()
159 pat.setNegativePrefix("-"); in TestAPI()
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DIntlTestDecimalFormatAPI.java63 String pat = ",##0.0000"; in testJB1871() local
64 DecimalFormat dec = new DecimalFormat(pat); in testJB1871()
69 errln("Fail: " + number + " x \"" + pat + "\" = \"" + in testJB1871()
73 pat = ",##0.0001"; in testJB1871()
74 dec = new DecimalFormat(pat); in testJB1871()
78 errln("Fail: " + number + " x \"" + pat + "\" = \"" + in testJB1871()
83 pat = ",##0.00000000000000000001"; in testJB1871()
84 dec = new DecimalFormat(pat); in testJB1871()
91 errln("Fail: " + bignumber + " x \"" + pat + "\" = \"" + in testJB1871()
114 DecimalFormat pat = null; in TestAPI() local
[all …]
DNumberFormatTestCases.txt21 pat: - "0.####"
23 pat: - "0.####"
26 pat: - "0"
32 pat: - -
34 pat: - "#,@@@"
37 pat: - -
43 pat: - -
48 pat: - -
53 pat: - -
58 pat: - -
[all …]
/external/rust/crates/remain/src/
Dcheck.rs106 let pat = match &self.pat { in to_path() localVariable
107 Pat::Or(pat) => pat.cases.iter().next().expect("at least one pat"), in to_path()
108 _ => &self.pat, in to_path()
111 let segments = match pat { in to_path()
112 Pat::Ident(pat) if is_just_ident(pat) => vec![pat.ident.clone()], in to_path()
113 Pat::Path(pat) => idents_of_path(&pat.path), in to_path()
114 Pat::Struct(pat) => idents_of_path(&pat.path), in to_path()
115 Pat::TupleStruct(pat) => idents_of_path(&pat.path), in to_path()
116 Pat::Wild(pat) => vec![Ident::from(pat.underscore_token)], in to_path()
134 fn is_just_ident(pat: &PatIdent) -> bool { in is_just_ident()
[all …]
/external/cronet/third_party/icu/source/test/testdata/
DNumberFormatTestCases.txt19 pat: - "0.####"
21 pat: - "0.####"
24 pat: - "0"
30 pat: - -
32 pat: - "#,@@@"
35 pat: - -
41 pat: - -
46 pat: - -
51 pat: - -
56 pat: - -
[all …]
/external/icu/icu4c/source/test/testdata/
DNumberFormatTestCases.txt19 pat: - "0.####"
21 pat: - "0.####"
24 pat: - "0"
30 pat: - -
32 pat: - "#,@@@"
35 pat: - -
41 pat: - -
46 pat: - -
51 pat: - -
56 pat: - -
[all …]
/external/slf4j/slf4j-migrator/src/test/java/org/slf4j/migrator/
DAternativeApproach.java46 Pattern pat = cr2.getPattern(); in test() local
47 Matcher m = pat.matcher(s); in test()
62 Pattern pat = Pattern.compile("(Log)"); in test2() local
64 Matcher m = pat.matcher(s); in test2()
70 m = pat.matcher(s1); in test2()
76 m = pat.matcher(s2); in test2()
80 m = pat.matcher(s3); in test2()
90 Pattern pat = Pattern.compile("LogFactory.getFactory\\(\\).getInstance\\("); in test3() local
92 Matcher m = pat.matcher(s); in test3()
98 pat.matcher(nonMatching); in test3()
[all …]
/external/apache-xml/src/main/java/org/apache/xpath/compiler/
DLexer.java96 void tokenize(String pat) throws javax.xml.transform.TransformerException in tokenize() argument
98 tokenize(pat, null); in tokenize()
109 void tokenize(String pat, Vector targetStrings) in tokenize() argument
113 m_compiler.m_currentPattern = pat; in tokenize()
120 int initTokQueueSize = ((pat.length() < OpMap.MAXTOKENQUEUESIZE) in tokenize()
121 ? pat.length() : OpMap.MAXTOKENQUEUESIZE) * 5; in tokenize()
126 int nChars = pat.length(); in tokenize()
140 char c = pat.charAt(i); in tokenize()
154 posOfNSSep = mapNSTokens(pat, startSubstring, posOfNSSep, i); in tokenize()
158 addToTokenQueue(pat.substring(startSubstring, i)); in tokenize()
[all …]
/external/autotest/client/deps/fakemodem/src/
Dfakemodem.c118 Pattern *pat; in parse_pattern_files() local
119 pat = g_malloc (sizeof (*pat)); in parse_pattern_files()
121 pat->command = g_regex_new (command, in parse_pattern_files()
129 if (pat->command == NULL) { in parse_pattern_files()
139 pat->responsetext = responsetext; in parse_pattern_files()
140 pat->reply = g_match_info_fetch (info, 4); in parse_pattern_files()
141 while (pat->reply[strlen (pat->reply) - 1] == '\\') { in parse_pattern_files()
143 pat->reply[strlen (pat->reply) - 1] = '\0'; in parse_pattern_files()
148 origstr = pat->reply; in parse_pattern_files()
149 pat->reply = g_strjoin ("\r\n", origstr, line, NULL); in parse_pattern_files()
[all …]
/external/python/cpython2/Lib/idlelib/idle_test/
Dtest_searchengine.py186 pat = '[a-z'
189 Equal(self.engine.report_error(pat, msg), None)
194 Equal(self.engine.report_error(pat, msg, 5), None)
214 cls.pat = re.compile('target')
230 pat = self.pat
241 Equal(search(text, pat), ('f', (text, pat, 1, 5, True, False)))
243 Equal(search(text, pat), ('f', (text, pat, 1, 5, False, False)))
246 Equal(search(text, pat), ('b', (text, pat, 1, 5, True, False)))
254 Equal(search(text, pat), ('f', (text, pat, 2, 16, True, False)))
255 Equal(search(text, pat, True), ('f', (text, pat, 2, 10, True, True)))
[all …]
/external/python/cpython3/Lib/idlelib/idle_test/
Dtest_searchengine.py189 pat = '[a-z'
192 Equal(self.engine.report_error(pat, msg), None)
197 Equal(self.engine.report_error(pat, msg, 5), None)
217 cls.pat = re.compile('target')
233 pat = self.pat
244 Equal(search(text, pat), ('f', (text, pat, 1, 5, True, False)))
246 Equal(search(text, pat), ('f', (text, pat, 1, 5, False, False)))
249 Equal(search(text, pat), ('b', (text, pat, 1, 5, True, False)))
257 Equal(search(text, pat), ('f', (text, pat, 2, 16, True, False)))
258 Equal(search(text, pat, True), ('f', (text, pat, 2, 10, True, True)))
[all …]
/external/icu/android_icu4j/testing/src/com/android/icu/test/util/regex/
DMatcherNativeTest.java326 Pattern pat = Pattern.compile("((a)|(b))++c"); in testGroupPossessive() local
327 Matcher mat = pat.matcher("aac"); in testGroupPossessive()
353 Pattern pat = Pattern.compile(testPatterns[i]); in testMatchesMisc() local
355 Matcher mat = pat.matcher(posSeq[i][j]); in testMatchesMisc()
377 Pattern pat = Pattern.compile(testPatternsSingles[i]); in testMatchesQuantifiers() local
379 assertTrue("Match expected, but failed: " + pat.pattern() in testMatchesQuantifiers()
380 + " : " + stringSingles[i][j], pat.matcher( in testMatchesQuantifiers()
383 + pat.pattern() + " : " + stringSingles[i][j * 2 + 1], in testMatchesQuantifiers()
384 pat.matcher(stringSingles[i][j * 2 + 1]).matches()); in testMatchesQuantifiers()
389 Pattern pat = Pattern.compile(testPatternsMultiple[i]); in testMatchesQuantifiers() local
[all …]
/external/python/cpython3/Lib/idlelib/
Dsearchengine.py40 def setpat(self, pat): argument
41 self.patvar.set(pat)
60 def setcookedpat(self, pat): argument
64 pat = re.escape(pat)
65 self.setpat(pat)
68 pat = self.getpat()
70 pat = re.escape(pat)
72 pat = r"\b%s\b" % pat
73 return pat
77 pat = self.getpat()
[all …]
/external/python/cpython2/Lib/idlelib/
DSearchEngine.py38 def setpat(self, pat): argument
39 self.patvar.set(pat)
58 def setcookedpat(self, pat): argument
62 pat = re.escape(pat)
63 self.setpat(pat)
66 pat = self.getpat()
68 pat = re.escape(pat)
70 pat = r"\b%s\b" % pat
71 return pat
75 pat = self.getpat()
[all …]
/external/cronet/buildtools/third_party/libc++/trunk/test/std/localization/locale.categories/category.time/locale.time.put.byname/
Dput1.pass.cpp65 std::string pat("Today is %A which is abbreviated %a."); in main() local
67 … f.put(cpp17_output_iterator<char*>(str), ios, '*', &t, pat.data(), pat.data() + pat.size()); in main()
73 std::string pat("Today is %A which is abbreviated '%a'."); in main() local
75 … f.put(cpp17_output_iterator<char*>(str), ios, '*', &t, pat.data(), pat.data() + pat.size()); in main()
83 std::string pat("Today is %A which is the %uth day or alternatively %Ou."); in main() local
85 … f.put(cpp17_output_iterator<char*>(str), ios, '*', &t, pat.data(), pat.data() + pat.size()); in main()

12345678910>>...24