Home
last modified time | relevance | path

Searched refs:regex (Results 1 – 25 of 59) 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.h59 if (!std::regex_search(__s, std::regex((pattern)))) { \
67 if (std::regex_search(__s, std::regex((pattern)))) { \
75 if (!std::regex_search(__s, std::regex((pattern)))) { \
83 if (std::regex_search(__s, 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.cpp83 details::Regex regex; in matchInstance() local
84 if (!regex.compile(regexPattern())) { in matchInstance()
87 return regex.matches(e); in matchInstance()
DKernelConfigParser.cpp59 static const std::regex sKeyValuePattern("^\\s*" KEY "\\s*=\\s*([^#]+)" COMMENT "?$"); in processRemaining()
60 static const std::regex sNotSetPattern("^\\s*#\\s*" KEY " is not set\\s*$"); in processRemaining()
61 static const std::regex sCommentPattern("^\\s*" COMMENT "$"); in processRemaining()
/system/apex/tests/src/com/android/tests/apex/
DMediaSwCodecHostTest.java30 import java.util.regex.Matcher;
31 import java.util.regex.Pattern;
DMediaHostTest.java29 import java.util.regex.Matcher;
30 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/bt/gd/packet/parser/
Dutil.h69 static const std::regex camel_case_regex("[A-Z][a-z0-9]*"); in CamelCaseToUnderScore()
112 static const std::regex enum_regex("[A-Z][A-Z0-9_]*"); in IsEnumCase()
/system/linkerconfig/contents/tests/configuration/include/
Dlinkerconfigparser.h35 static std::regex dir_regex(kDirRegex); in ParseDirPath()
203 static std::regex section_name_regex(kSectionNameRegex); in ParseConfiguration()
204 static std::regex additional_namespaces_regex(kAdditionalNamespacesRegex); in ParseConfiguration()
205 static std::regex namespace_base_regex(kNamespaceBaseRegex); in ParseConfiguration()
/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/apex/tests/sdkextensions/test-src/com/android/tests/apex/sdkextensions/
DSdkExtensionsHostTest.java34 import java.util.regex.Matcher;
35 import java.util.regex.Pattern;
/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/tools/hidl/host_utils/
DStringHelper.cpp32 static const std::regex kStartUppercase("^" UPPERCASE);
33 static const std::regex kStartLowercase("^" LOWERCASE);
34 static const std::regex kStartCapcase("^" CAPCASE);
35 static const std::regex kStartNumcase("^" CAPCASE);
/system/timezone/input_tools/android/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/fs_mgr/tests/src/com/android/tests/vendoroverlay/
DVendorOverlayHostTest.java25 import java.util.regex.Matcher;
26 import java.util.regex.Pattern;
/system/testing/gtest_extras/tests/
DSystemTests.cpp148 std::regex_replace(raw_output_, std::regex("\\(\\d+ ms(\\)|\\s|,)"), "(XX ms$1"); in SanitizeOutput()
152 sanitized_output_, std::regex("\\(elapsed time \\d+ ms(\\)|\\s|,)"), "(elapsed time XX ms$1"); in SanitizeOutput()
156 std::regex("(stopped|timeout) at \\d+ ms"), "$1 at XX ms"); in SanitizeOutput()
160 sanitized_output_, std::regex("\\b([^/\\s]+/)*[^/\\s]+:\\(\\d+\\)\\s"), "file:(XX) "); in SanitizeOutput()
164 std::regex_replace(sanitized_output_, std::regex("( terminated by signal:) .*"), "$1 XXX"); in SanitizeOutput()
709 std::regex regex("\\n.*\\d+ FAILED TESTS\\n"); in TEST_F() local
711 ASSERT_TRUE(std::regex_search(sanitized_output_.c_str(), match, regex)) << "Test Output:\n" in TEST_F()
933 std::regex_replace(xml_output, std::regex("(time|timestamp)=\"[^\"]+\""), "$1=\"XX\""); in TEST_F()
935 xml_output = std::regex_replace(xml_output, std::regex("\"([^/\\s]+/)*[^/\\s]+:\\(\\d+\\)\\s"), in TEST_F()
/system/timezone/distro/core/src/main/com/android/timezone/distro/
DDistroVersion.java21 import java.util.regex.Matcher;
22 import java.util.regex.Pattern;
/system/core/libprocessgroup/
Dcgroup_map.cpp98 proc_path = regex_replace(proc_path, std::regex("<uid>"), std::to_string(uid)); in GetProcsFilePath()
99 proc_path = regex_replace(proc_path, std::regex("<pid>"), std::to_string(pid)); in GetProcsFilePath()
/system/tools/sysprop/
DCommon.cpp144 static const std::regex vendor_regex( in ValidateProp()
146 static const std::regex odm_regex( in ValidateProp()
339 static const std::regex kRegexAllowed{"-|\\."}; in ApiNameToIdentifier()
/system/testing/gtest_extras/
DTest.cpp36 std::regex Test::skipped_regex_("(^|\\n)[^\\n]+:\\(\\d+\\) Skipped\\n");
DTest.h99 static std::regex skipped_regex_;

123