Home
last modified time | relevance | path

Searched refs:regex (Results 1 - 25 of 673) sorted by relevance

12345678910>>...27

/third_party/selinux/libselinux/src/
H A Dregex.c7 #include "regex.h"
67 pcre2_code *regex; /* compiled regular expression */ member
70 int regex_prepare_data(struct regex_data **regex, char const *pattern_string, in regex_prepare_data() argument
75 *regex = regex_data_create(); in regex_prepare_data()
76 if (!(*regex)) in regex_prepare_data()
79 (*regex)->regex = pcre2_compile( in regex_prepare_data()
82 if (!(*regex)->regex) { in regex_prepare_data()
89 regex_data_free(*regex); in regex_prepare_data()
105 regex_load_mmap(struct mmap_area *mmap_area, struct regex_data **regex, int do_load_precompregex, bool *regex_compiled) regex_load_mmap() argument
150 regex_writef(struct regex_data *regex, FILE *fp, int do_write_precompregex) regex_writef() argument
211 regex_data_free(struct regex_data *regex) regex_data_free() argument
220 regex_match(struct regex_data *regex, char const *subject, int partial) regex_match() argument
325 pcre *regex; /* compiled regular expression */ global() member
332 regex_prepare_data(struct regex_data **regex, char const *pattern_string, struct regex_error_data *errordata) regex_prepare_data() argument
366 regex_load_mmap(struct mmap_area *mmap_area, struct regex_data **regex, int do_load_precompregex __attribute__((unused)), bool *regex_compiled) regex_load_mmap() argument
422 get_pcre_extra(struct regex_data *regex) get_pcre_extra() argument
434 regex_writef(struct regex_data *regex, FILE *fp, int do_write_precompregex __attribute__((unused))) regex_writef() argument
484 regex_data_free(struct regex_data *regex) regex_data_free() argument
497 regex_match(struct regex_data *regex, char const *subject, int partial) regex_match() argument
[all...]
/third_party/rust/crates/regex/examples/
H A Dshootout-regex-dna-single.rs10 macro_rules! regex { macros
12 ::regex::Regex::new($re).unwrap()
21 seq = regex!(">[^\n]*\n|\n").replace_all(&seq, "").into_owned(); in main()
25 regex!("agggtaaa|tttaccct"), in main()
26 regex!("[cgt]gggtaaa|tttaccc[acg]"), in main()
27 regex!("a[act]ggtaaa|tttacc[agt]t"), in main()
28 regex!("ag[act]gtaaa|tttac[agt]ct"), in main()
29 regex!("agg[act]taaa|ttta[agt]cct"), in main()
30 regex!("aggg[acg]aaa|ttt[cgt]ccct"), in main()
31 regex!("aggg in main()
[all...]
H A Dshootout-regex-dna.rs12 macro_rules! regex { macros
14 ::regex::Regex::new($re).unwrap()
23 seq = regex!(">[^\n]*\n|\n").replace_all(&seq, "").into_owned(); in main()
28 regex!("agggtaaa|tttaccct"), in main()
29 regex!("[cgt]gggtaaa|tttaccc[acg]"), in main()
30 regex!("a[act]ggtaaa|tttacc[agt]t"), in main()
31 regex!("ag[act]gtaaa|tttac[agt]ct"), in main()
32 regex!("agg[act]taaa|ttta[agt]cct"), in main()
33 regex!("aggg[acg]aaa|ttt[cgt]ccct"), in main()
34 regex!("aggg in main()
[all...]
H A Dshootout-regex-dna-bytes.rs12 macro_rules! regex { macros
14 ::regex::bytes::Regex::new($re).unwrap()
23 seq = regex!(">[^\n]*\n|\n").replace_all(&seq, &b""[..]).into_owned(); in main()
28 regex!("agggtaaa|tttaccct"), in main()
29 regex!("[cgt]gggtaaa|tttaccc[acg]"), in main()
30 regex!("a[act]ggtaaa|tttacc[agt]t"), in main()
31 regex!("ag[act]gtaaa|tttac[agt]ct"), in main()
32 regex!("agg[act]taaa|ttta[agt]cct"), in main()
33 regex!("aggg[acg]aaa|ttt[cgt]ccct"), in main()
34 regex!("aggg in main()
[all...]
H A Dshootout-regex-dna-single-cheat.rs10 macro_rules! regex { macros
12 ::regex::Regex::new($re).unwrap()
21 seq = regex!(">[^\n]*\n|\n").replace_all(&seq, "").into_owned(); in main()
25 regex!("agggtaaa|tttaccct"), in main()
26 regex!("[cgt]gggtaaa|tttaccc[acg]"), in main()
27 regex!("a[act]ggtaaa|tttacc[agt]t"), in main()
28 regex!("ag[act]gtaaa|tttac[agt]ct"), in main()
29 regex!("agg[act]taaa|ttta[agt]cct"), in main()
30 regex!("aggg[acg]aaa|ttt[cgt]ccct"), in main()
31 regex!("aggg in main()
[all...]
H A Dshootout-regex-dna-cheat.rs8 // This technically solves the problem posed in the `regex-dna` benchmark, but
9 // it cheats by combining all of the replacements into a single regex and
17 macro_rules! regex { macros
19 ::regex::Regex::new($re).unwrap()
28 seq = regex!(">[^\n]*\n|\n").replace_all(&seq, "").into_owned(); in main()
33 regex!("agggtaaa|tttaccct"), in main()
34 regex!("[cgt]gggtaaa|tttaccc[acg]"), in main()
35 regex!("a[act]ggtaaa|tttacc[agt]t"), in main()
36 regex!("ag[act]gtaaa|tttac[agt]ct"), in main()
37 regex!("ag in main()
[all...]
/third_party/mesa3d/src/gtest/include/gtest/
H A Dgtest-death-test.h103 // On POSIX-compliant systems (*nix), we use the <regex.h> library,
104 // which uses the POSIX extended regex syntax.
106 // On other platforms (e.g. Windows or Mac), we only support a simple regex
110 // or POSIX extended regex syntax. For example, we don't support
115 // subset of both PCRE and POSIX extended regex, so it's easy to
142 // If you accidentally use PCRE or POSIX extended regex features
148 // as a compiled regex library, but should perform well enough for a
167 // that matches regex.
168 # define ASSERT_EXIT(statement, predicate, regex) \
169 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE
[all...]
/third_party/libabigail/src/
H A Dabg-suppression-priv.h17 #include "abg-regex.h"
36 mutable regex::regex_t_sptr file_name_regex_;
38 mutable regex::regex_t_sptr file_name_not_regex_;
40 mutable regex::regex_t_sptr soname_regex_;
42 mutable regex::regex_t_sptr soname_not_regex_;
76 const regex::regex_t_sptr&
80 file_name_regex_ = regex::compile(file_name_regex_str_); in get_file_name_regex()
92 const regex::regex_t_sptr&
96 file_name_not_regex_ = regex::compile(file_name_not_regex_str_); in get_file_name_not_regex()
108 const regex
[all...]
/third_party/googletest/googletest/include/gtest/
H A Dgtest-death-test.h108 // On POSIX-compliant systems (*nix), we use the <regex.h> library,
109 // which uses the POSIX extended regex syntax.
111 // On other platforms (e.g. Windows or Mac), we only support a simple regex
115 // or POSIX extended regex syntax. For example, we don't support
120 // subset of both PCRE and POSIX extended regex, so it's easy to
147 // If you accidentally use PCRE or POSIX extended regex features
153 // as a compiled regex library, but should perform well enough for a
264 #define EXPECT_DEBUG_DEATH(statement, regex) \
265 GTEST_EXECUTE_STATEMENT_(statement, regex)
267 #define ASSERT_DEBUG_DEATH(statement, regex) \
[all...]
/third_party/node/deps/googletest/include/gtest/
H A Dgtest-death-test.h108 // On POSIX-compliant systems (*nix), we use the <regex.h> library,
109 // which uses the POSIX extended regex syntax.
111 // On other platforms (e.g. Windows or Mac), we only support a simple regex
115 // or POSIX extended regex syntax. For example, we don't support
120 // subset of both PCRE and POSIX extended regex, so it's easy to
147 // If you accidentally use PCRE or POSIX extended regex features
153 // as a compiled regex library, but should perform well enough for a
264 #define EXPECT_DEBUG_DEATH(statement, regex) \
265 GTEST_EXECUTE_STATEMENT_(statement, regex)
267 #define ASSERT_DEBUG_DEATH(statement, regex) \
[all...]
/third_party/libphonenumber/metadata/src/main/java/com/google/i18n/phonenumbers/metadata/regex/
H A DRegexFormatter.java17 package com.google.i18n.phonenumbers.metadata.regex;
46 public static String format(String regex, FormatOption formatOption) { in format() argument
47 return new RegexFormatter(regex, formatOption).format(); in format()
51 private final String regex; field in RegexFormatter
54 private RegexFormatter(String regex, FormatOption formatOption) { in RegexFormatter() argument
55 this.regex = CharMatcher.whitespace().removeFrom(regex); in RegexFormatter()
66 while (pos < regex.length()) { in recurse()
69 if (regex.charAt(pos) == ')') { in recurse()
73 int nextToken = tokens.indexIn(regex, po in recurse()
[all...]
H A DRegexGenerator.java17 package com.google.i18n.phonenumbers.metadata.regex;
29 import com.google.i18n.phonenumbers.metadata.regex.Edge.SimpleEdge;
51 * Returns the default regex generator for XML data. This should be used by any tool wishing to
118 // The regex of the empty range is "a regex that matches nothing". This is meaningless. in toRegex()
123 // "the regex that always immediately terminates after no input". This is also meaningless. in toRegex()
127 String regex = generateFactorizedRegex(ranges); in toRegex()
129 regex = recursivelyOptimizeSubgroups(ranges, regex); in toRegex()
131 return regex; in toRegex()
134 recursivelyOptimizeSubgroups(RangeTree ranges, String regex) recursivelyOptimizeSubgroups() argument
[all...]
/foundation/ability/ability_runtime/test/moduletest/module_test_dump_util/
H A Dmodule_test_dump_util.cpp38 findRgx_["Want"] = regex(".*Want\\[(.+)\\].*"); in MTDumpUtil()
39 findRgx_["AbilityName"] = regex(".*main name \\[(.+)\\].*"); in MTDumpUtil()
40 findRgx_["AppName"] = regex(".*app name \\[(.+)\\].*"); in MTDumpUtil()
41 findRgx_["BundleName"] = regex(".*bundle name \\[(.+)\\].*"); in MTDumpUtil()
42 findRgx_["AbilityType"] = regex(".*ability type \\[(.+)\\].*"); in MTDumpUtil()
43 findRgx_["PreAbilityName"] = regex(".*previous ability app name \\[(.+)\\].*"); in MTDumpUtil()
44 findRgx_["PreAppName"] = regex(".*previous ability file name \\[(.+)\\].*"); in MTDumpUtil()
45 findRgx_["NextAbilityName"] = regex(".*next ability app name \\[(.+)\\].*"); in MTDumpUtil()
46 findRgx_["NextAppName"] = regex(".*next ability file name \\[(.+)\\].*"); in MTDumpUtil()
47 findRgx_["State"] = regex(" in MTDumpUtil()
87 MatchRegex(const regex& regex, const string& str, string& result) MatchRegex() argument
[all...]
/third_party/libphonenumber/metadata/src/test/java/com/google/i18n/phonenumbers/metadata/regex/
H A DEdgeWriterTest.java17 package com.google.i18n.phonenumbers.metadata.regex;
23 import com.google.i18n.phonenumbers.metadata.regex.Edge.SimpleEdge;
45 assertThat(regex(e("0"))).isEqualTo("0"); in testSimple()
46 assertThat(regex(e("[0-7]"))).isEqualTo("[0-7]"); in testSimple()
47 assertThat(regex(e("[0-9]"))).isEqualTo("\\d"); in testSimple()
48 assertThat(regex(X)).isEqualTo("\\d"); in testSimple()
53 assertThat(regex(seq(e("0"), e("1"), e("2")))).isEqualTo("012"); in testSequences()
59 assertThat(regex(or(e("0"), e("1"), e("2")))).isEqualTo("0|1|2"); in testGroups()
61 assertThat(regex(opt(e("0"), e("1"), e("2")))).isEqualTo("(?:0|1|2)?"); in testGroups()
63 assertThat(regex( in testGroups()
118 private String regex(Edge e) { regex() method in EdgeWriterTest
[all...]
/third_party/rust/crates/regex/tests/
H A Dtest_default.rs3 use regex;
11 // regex and the input. Other dynamic tests explicitly set the engine to use.
14 use regex::Regex;
19 macro_rules! regex { macros
27 use regex::RegexSet;
66 assert!(regex::Regex::new(r"(?-u)\xFF").is_err()); in disallow_non_utf8()
67 assert!(regex::Regex::new(r"(?-u).").is_err()); in disallow_non_utf8()
68 assert!(regex::Regex::new(r"(?-u)[\xFF]").is_err()); in disallow_non_utf8()
69 assert!(regex::Regex::new(r"(?-u)☃").is_err()); in disallow_non_utf8()
74 assert!(regex in disallow_octal()
[all...]
H A Dapi.rs3 let re = regex!(""); in empty_regex_empty_match()
9 let re = regex!(""); in empty_regex_nonempty_match()
15 let re = regex!(r"[0-9]*"); in one_zero_length_match()
21 let re = regex!(r"[0-9]*"); in many_zero_length_match()
30 let re = regex!(r"[0-9]?"); in many_sequential_zero_length_match()
39 let re = regex!(r"([\x{5b}\x{5d}])"); in quoted_bracket_set()
41 let re = regex!(r"([\[\]])"); in quoted_bracket_set()
47 let re = regex!(r"([\[-z])"); in first_range_starts_with_left_bracket()
53 let re = regex!(r"([\[-\x{5d}])"); in range_ends_with_escape()
59 let re = regex!( in empty_match_find_iter()
[all...]
/test/testfwk/arkxtest/jsunit/src/module/mock/
H A DArgumentMatchers.js44 let regex = arguments[0];
45 if (ArgumentMatchers.isRegExp(regex)) {
46 return regex;
48 throw Error('not a regex');
57 let regex = arguments[1];
64 if (typeof arg === 'string' && !regex) {
68 if (typeof arg === 'boolean' && !regex) {
72 if (typeof arg === 'number' && !regex) {
76 if (typeof arg === 'object' && !regex) {
80 if (typeof arg === 'function' && !regex) {
[all...]
/test/testfwk/arkxtest/hamock/src/main/mock/
H A DArgumentMatchers.js37 static matchRegexs(regex) {
38 if (ArgumentMatchers.isRegExp(regex)) {
39 return regex;
41 throw Error('not a regex');
48 let regex = args[1];
54 if (typeof arg === 'string' && !regex) {
58 if (typeof arg === 'boolean' && !regex) {
62 if (typeof arg === 'number' && !regex) {
66 if (typeof arg === 'object' && !regex) {
70 if (typeof arg === 'function' && !regex) {
[all...]
/third_party/skia/third_party/externals/tint/tools/src/match/
H A Dmatch.go37 // Transform pattern into a regex by replacing the uses of `?`, `*`, `**`
38 // with corresponding regex patterns.
39 // As the pattern may contain other regex sequences, the string has to be
42 // b) Escape the expression so that other sequences don't confuse the regex
44 // c) Replace the placeholder tokens with the corresponding regex tokens.
63 // Escape any remaining regex characters
65 // Insert regex matchers for the substituted tokens
66 regex := "^" + escaped + "$"
67 regex = strings.ReplaceAll(regex, starsta
[all...]
/third_party/googletest/googletest/src/
H A Dgtest-port.cc664 // regfree'ing an invalid regex might crash because the content in ~RE()
665 // of the regex is undefined. Since the regex's are essentially in ~RE()
692 void RE::Init(const char* regex) { in Init() argument
693 pattern_ = posix::StrDup(regex); in Init()
697 const size_t full_regex_len = strlen(regex) + 10; in Init()
700 snprintf(full_pattern, full_regex_len, "^(%s)$", regex); in Init()
707 // Some implementation of POSIX regex (e.g. on at least some in Init()
709 // regex. We change it to an equivalent form "()" to be safe. in Init()
711 const char* const partial_regex = (*regex in Init()
783 FormatRegexSyntaxError(const char* regex, int index) FormatRegexSyntaxError() argument
791 ValidateRegex(const char* regex) ValidateRegex() argument
851 MatchRepetitionAndRegexAtHead(bool escaped, char c, char repeat, const char* regex, const char* str) MatchRepetitionAndRegexAtHead() argument
875 MatchRegexAtHead(const char* regex, const char* str) MatchRegexAtHead() argument
909 MatchRegexAnywhere(const char* regex, const char* str) MatchRegexAnywhere() argument
940 Init(const char* regex) Init() argument
[all...]
/third_party/mesa3d/src/gtest/src/
H A Dgtest-port.cc708 // regfree'ing an invalid regex might crash because the content in ~RE()
709 // of the regex is undefined. Since the regex's are essentially in ~RE()
736 void RE::Init(const char* regex) { in Init() argument
737 pattern_ = posix::StrDup(regex); in Init()
741 const size_t full_regex_len = strlen(regex) + 10; in Init()
744 snprintf(full_pattern, full_regex_len, "^(%s)$", regex); in Init()
751 // Some implementation of POSIX regex (e.g. on at least some in Init()
753 // regex. We change it to an equivalent form "()" to be safe. in Init()
755 const char* const partial_regex = (*regex in Init()
816 FormatRegexSyntaxError(const char* regex, int index) FormatRegexSyntaxError() argument
823 ValidateRegex(const char* regex) ValidateRegex() argument
883 MatchRepetitionAndRegexAtHead( bool escaped, char c, char repeat, const char* regex, const char* str) MatchRepetitionAndRegexAtHead() argument
910 MatchRegexAtHead(const char* regex, const char* str) MatchRegexAtHead() argument
946 MatchRegexAnywhere(const char* regex, const char* str) MatchRegexAnywhere() argument
979 Init(const char* regex) Init() argument
[all...]
/third_party/node/deps/googletest/src/
H A Dgtest-port.cc670 // regfree'ing an invalid regex might crash because the content in ~RE()
671 // of the regex is undefined. Since the regex's are essentially in ~RE()
697 void RE::Init(const char* regex) { in Init() argument
698 pattern_ = regex; in Init()
700 // NetBSD (and Android, which takes its regex implemntation from NetBSD) does in Init()
701 // not include the GNU regex extensions (such as Perl style character classes in Init()
713 const size_t full_regex_len = strlen(regex) + 10; in Init()
716 snprintf(full_pattern, full_regex_len, "^(%s)$", regex); in Init()
723 // Some implementation of POSIX regex ( in Init()
799 FormatRegexSyntaxError(const char* regex, int index) FormatRegexSyntaxError() argument
807 ValidateRegex(const char* regex) ValidateRegex() argument
867 MatchRepetitionAndRegexAtHead(bool escaped, char c, char repeat, const char* regex, const char* str) MatchRepetitionAndRegexAtHead() argument
891 MatchRegexAtHead(const char* regex, const char* str) MatchRegexAtHead() argument
925 MatchRegexAnywhere(const char* regex, const char* str) MatchRegexAnywhere() argument
953 Init(const char* regex) Init() argument
[all...]
/third_party/rust/crates/bindgen/bindgen-cli/
H A Doptions.rs72 /// Mark any enum whose name matches <regex> as a module of constants.
266 /// Do not record matching items in the regex sets. This disables reporting of unused items.
338 /// Overrides the ABI of functions matching <regex>. The <OVERRIDE> value must be of the shape <REGEX>=<ABI> where <ABI> can be one of C, stdcall, fastcall, thiscall, aapcs, win64 or C-unwind.
525 for regex in bitfield_enum { in builder_from_flags()
526 builder = builder.bitfield_enum(regex); in builder_from_flags()
529 for regex in newtype_enum { in builder_from_flags()
530 builder = builder.newtype_enum(regex); in builder_from_flags()
533 for regex in newtype_global_enum { in builder_from_flags()
534 builder = builder.newtype_global_enum(regex); in builder_from_flags()
537 for regex i in builder_from_flags()
[all...]
/foundation/arkui/ace_engine/frameworks/core/components/theme/
H A Dtheme_utils.cpp18 #include <regex>
28 const std::regex THEME_ID_REGEX(R"(^\"@id([0-9]+)\"$)", std::regex::icase); // regex for "@id001"
30 const std::regex THEME_ATTR_REGEX(R"(\?theme:([a-zA-Z0-9_]+))"); // regex for "?theme:attr_color_emphasis"
34 const std::regex OHOS_ID_REGEX(R"(^@ohos_id_([0-9]+)$)", std::regex::icase); // regex for "@ohos_id_001"
35 // regex fo
[all...]
/foundation/multimedia/image_framework/frameworks/innerkitsimpl/accessor/include/
H A Dexif_metadata_formatter.h58 static bool ValidRegex(const std::string &value, const std::string &regex);
59 static bool ValidRegexWithComma(std::string &value, const std::string &regex);
60 static bool ValidRegexWithRationalFormat(std::string &value, const std::string &regex);
61 static bool ValidRegexWithCommaRationalFormat(std::string &value, const std::string &regex);
62 static bool ValidRegexWithColonRationalFormat(std::string &value, const std::string &regex);
63 static bool ValidRegexWithDot(std::string &value, const std::string &regex);
64 static bool ValidRegxWithCommaDecimalRationalFormat(std::string &value, const std::string &regex);
65 static bool ValidRegexWithVersionFormat(std::string &value, const std::string &regex);
66 static bool ValidRegxAndConvertRationalFormat(std::string &value, const std::string &regex);
67 static bool ValidRegexWithDecimalRationalFormat(std::string &value, const std::string &regex);
[all...]

Completed in 11 milliseconds

12345678910>>...27