Home
last modified time | relevance | path

Searched refs:regex (Results 1 – 25 of 55) sorted by relevance

123

/system/keymaster/android_keymaster/
Dkeymaster_configuration.cpp83 regex_t regex; in GetOsVersion() local
84 if (regcomp(&regex, kPlatformVersionRegex, REG_EXTENDED)) { in GetOsVersion()
91 regexec(&regex, version_str, kPlatformVersionMatchCount, matches, 0 /* flags */); in GetOsVersion()
92 regfree(&regex); in GetOsVersion()
111 regex_t regex; in GetOsPatchlevel() local
112 if (regcomp(&regex, kPlatformPatchlevelRegex, REG_EXTENDED) != 0) { in GetOsPatchlevel()
119 regexec(&regex, patchlevel_str, kPlatformPatchlevelMatchCount, matches, 0 /* flags */); in GetOsPatchlevel()
120 regfree(&regex); in GetOsPatchlevel()
/system/core/base/include/android-base/
Dtest_utils.h58 if (!std::regex_search((str), std::regex((pattern)))) { \
65 if (std::regex_search((str), std::regex((pattern)))) { \
72 if (!std::regex_search((str), std::regex((pattern)))) { \
79 if (std::regex_search((str), std::regex((pattern)))) { \
/system/hardware/interfaces/net/netd/testutils/
DVtsHalNetNetdTestUtils.cpp74 const std::regex regex(regexString, std::regex_constants::extended); in countMatchingIpRules() local
80 if (std::regex_search(rule, regex)) { in countMatchingIpRules()
91 std::string regex = in countRulesForFwmark() local
93 return countMatchingIpRules(regex); in countRulesForFwmark()
/system/core/fastboot/fuzzy_fastboot/
Dextensions.h56 std::regex regex; member
104 std::regex regex; member
Dextensions.cpp51 std::regex MakeRegex(const std::string& regex_str, int line_num, in MakeRegex()
52 std::regex_constants::syntax_option_type type = std::regex::ECMAScript) { in MakeRegex()
63 std::regex ret(regex_str, type); in MakeRegex()
245 std::regex regex; in ExtractOem() local
247 ctest.regex = MakeRegex(ctest.regex_str, test->GetLineNum()); in ExtractOem()
/system/libvintf/
DMatrixInstance.cpp73 details::Regex regex; in matchInstance() local
74 if (!regex.compile(regexPattern())) { in matchInstance()
77 return regex.matches(e); in matchInstance()
DKernelConfigParser.cpp24 static const std::regex sKeyValuePattern("^\\s*" KEY "\\s*=\\s*([^#]+)" COMMENT "?$");
25 static const std::regex sNotSetPattern("^\\s*#\\s*" KEY " is not set\\s*$");
26 static const std::regex sCommentPattern("^\\s*" COMMENT "$");
/system/tools/hidl/utils/
DFQName.cpp88 static const std::regex kRE1("(" RE_PATH ")@(" RE_MAJOR ")[.](" RE_MINOR ")::(" RE_PATH ")"); in setTo()
90 static const std::regex kRE2("@(" RE_MAJOR ")[.](" RE_MINOR ")::(" RE_PATH ")"); in setTo()
92 static const std::regex kRE3("(" RE_PATH ")@(" RE_MAJOR ")[.](" RE_MINOR ")"); in setTo()
94 static const std::regex kRE4("(" RE_COMPONENT ")([.]" RE_COMPONENT ")+"); in setTo()
96 static const std::regex kRE5("(" RE_COMPONENT ")"); in setTo()
99 static const std::regex kRE6("(" RE_PATH ")@(" RE_MAJOR ")[.](" RE_MINOR ")::(" RE_PATH in setTo()
102 static const std::regex kRE7("@(" RE_MAJOR ")[.](" RE_MINOR ")::(" RE_PATH "):(" RE_COMPONENT in setTo()
105 static const std::regex kRE8("(" RE_PATH "):(" RE_COMPONENT ")"); in setTo()
209 static const std::regex kREVer("(" RE_MAJOR ")[.](" RE_MINOR ")"); in parseVersion()
/system/apex/tests/src/com/android/tests/apex/
DMediaHostTest.java32 import java.util.regex.Matcher;
33 import java.util.regex.Pattern;
DMediaSwCodecHostTest.java34 import java.util.regex.Matcher;
35 import java.util.regex.Pattern;
DApexTestUtils.java35 import java.util.regex.Matcher;
36 import java.util.regex.Pattern;
/system/sepolicy/tools/
Dcheck_seapp.c106 key_map_regex regex; member
326 int ret = pcre2_match(assert->regex.compiled, (PCRE2_SPTR) tomatch, in match_regex()
328 assert->regex.match_data, NULL); in match_regex()
348 km->regex.compiled = pcre2_compile((PCRE2_SPTR) anchored, in compile_regex()
353 if (!km->regex.compiled) { in compile_regex()
357 km->regex.match_data = pcre2_match_data_create_from_pattern( in compile_regex()
358 km->regex.compiled, NULL); in compile_regex()
359 if (!km->regex.match_data) { in compile_regex()
360 pcre2_code_free(km->regex.compiled); in compile_regex()
466 if (!m->regex.compiled) { in key_map_validate()
[all …]
/system/tools/hidl/c2hal/
DExpression.cpp27 static const std::regex RE_S32("[^ul]$");
28 static const std::regex RE_U32("[^ul]u$");
29 static const std::regex RE_S64("[^ul](l|ll)$");
30 static const std::regex RE_U64("[^ul](ul|ull)$");
DDeclaration.cpp24 static const std::regex RE_LEADING_SPACES("\n +");
/system/extras/tests/kernel.config/
Dscrape_mmap_addr.cpp13 …std::regex reg(std::string("^([a-f0-9]+)\\-[0-9a-f]+\\s+.+\\s+(\\d+)\\s+.+\\s+\\d+\\s+") + std::st… in main()
/system/core/fs_mgr/tests/src/com/android/tests/vendoroverlay/
DVendorOverlayHostTest.java25 import java.util.regex.Matcher;
26 import java.util.regex.Pattern;
/system/timezone/tzlookup_generator/src/main/java/com/android/libcore/timezone/tzlookup/
DUtils.java29 import java.util.regex.Matcher;
30 import java.util.regex.Pattern;
/system/core/libprocessgroup/
Dcgroup_map.cpp93 proc_path = regex_replace(proc_path, std::regex("<uid>"), std::to_string(uid)); in GetProcsFilePath()
94 proc_path = regex_replace(proc_path, std::regex("<pid>"), std::to_string(pid)); in GetProcsFilePath()
/system/timezone/distro/core/src/main/com/android/timezone/distro/
DDistroVersion.java21 import java.util.regex.Matcher;
22 import java.util.regex.Pattern;
/system/testing/gtest_extras/tests/
DSystemTests.cpp79 std::regex_replace(raw_output_, std::regex("\\(\\d+ ms(\\)|\\s|,)"), "(XX ms$1"); in SanitizeOutput()
83 sanitized_output_, std::regex("\\(elapsed time \\d+ ms(\\)|\\s|,)"), "(elapsed time XX ms$1"); in SanitizeOutput()
87 std::regex("(stopped|timeout) at \\d+ ms"), "$1 at XX ms"); in SanitizeOutput()
91 sanitized_output_, std::regex("\\b([^/\\s]+/)*[^/\\s]+:\\(\\d+\\)\\s"), "file:(XX) "); in SanitizeOutput()
726 std::regex regex("\\n.*\\d+ FAILED TESTS\\n"); in TEST_F() local
728 ASSERT_TRUE(std::regex_search(sanitized_output_.c_str(), match, regex)) << "Test Output:\n" in TEST_F()
937 std::regex_replace(xml_output, std::regex("(time|timestamp)=\"[^\"]+\""), "$1=\"XX\""); in TEST_F()
939 xml_output = std::regex_replace(xml_output, std::regex("\"([^/\\s]+/)*[^/\\s]+:\\(\\d+\\)\\s"), in TEST_F()
/system/tools/sysprop/
DCommon.cpp136 static const std::regex vendor_regex( in ValidateProp()
138 static const std::regex odm_regex( in ValidateProp()
333 static const std::regex kRegexAllowed{"-|\\."}; in ApiNameToIdentifier()
/system/tools/hidl/host_utils/
DStringHelper.cpp28 static const std::regex kStartUppercase("^" UPPERCASE);
29 static const std::regex kStartLowercase("^" LOWERCASE);
30 static const std::regex kStartCapcase("^" CAPCASE);
/system/netd/netutils_wrappers/
DNetUtilsWrapper-1.0.cpp92 const std::regex expectedRegexp(EXPECTED_REGEXPS[i], std::regex_constants::extended); in checkExpectedCommand()
/system/linkerconfig/modules/
Dconfigwriter.cc82 std::regex variable_regex(kVariableRegex); in ResolveVariables()
/system/extras/partition_tools/
Dlpdump.cc171 std::regex regex("/([a-zA-Z_]*)$"); in GetReadonlyPartitionName() local
173 if (!std::regex_match(entry.mount_point, match, regex)) return std::nullopt; in GetReadonlyPartitionName()

123