/external/selinux/libselinux/src/ |
D | regex.c | 7 #include "regex.h" 62 pcre2_code *regex; /* compiled regular expression */ member 71 int regex_prepare_data(struct regex_data **regex, char const *pattern_string, in regex_prepare_data() argument 76 *regex = regex_data_create(); in regex_prepare_data() 77 if (!(*regex)) in regex_prepare_data() 80 (*regex)->regex = pcre2_compile( in regex_prepare_data() 83 if (!(*regex)->regex) { in regex_prepare_data() 87 (*regex)->match_data = in regex_prepare_data() 88 pcre2_match_data_create_from_pattern((*regex)->regex, NULL); in regex_prepare_data() 89 if (!(*regex)->match_data) { in regex_prepare_data() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/unittests/Support/ |
D | RegexTest.cpp | 1 //===- llvm/unittest/Support/RegexTest.cpp - Regex tests --===// 10 #include "llvm/Support/Regex.h" 22 Regex r1("^[0-9]+$"); in TEST_F() 28 Regex r2("[0-9]+"); in TEST_F() 33 Regex r3("[0-9]+([a-f])?:([0-9]+)"); in TEST_F() 46 Regex r4("a[^b]+b"); in TEST_F() 57 Regex r5(NulPattern); in TEST_F() 65 Regex r1("([a-z]+)_\\1"); in TEST_F() 71 Regex r2("a([0-9])b\\1c\\1"); in TEST_F() 77 Regex r3("a([0-9])([a-z])b\\1\\2"); in TEST_F() [all …]
|
/external/llvm/unittests/Support/ |
D | RegexTest.cpp | 1 //===- llvm/unittest/Support/RegexTest.cpp - Regex tests --===// 10 #include "llvm/Support/Regex.h" 22 Regex r1("^[0-9]+$"); in TEST_F() 28 Regex r2("[0-9]+"); in TEST_F() 33 Regex r3("[0-9]+([a-f])?:([0-9]+)"); in TEST_F() 46 Regex r4("a[^b]+b"); in TEST_F() 57 Regex r5(NulPattern); in TEST_F() 65 Regex r1("([a-z]+)_\\1"); in TEST_F() 71 Regex r2("a([0-9])b\\1c\\1"); in TEST_F() 77 Regex r3("a([0-9])([a-z])b\\1\\2"); in TEST_F() [all …]
|
/external/llvm/include/llvm/Support/ |
D | Regex.h | 1 //===-- Regex.h - Regular Expression matcher implementation -*- C++ -*-----===// 28 class Regex { 46 /// Compiles the given regular expression \p Regex. 47 Regex(StringRef Regex, unsigned Flags = NoFlags); 48 Regex(const Regex &) = delete; 49 Regex &operator=(Regex regex) { 50 std::swap(preg, regex.preg); 51 std::swap(error, regex.error); 54 Regex(Regex &®ex) { in Regex() argument 55 preg = regex.preg; in Regex() [all …]
|
/external/libcxx/test/std/re/re.alg/re.alg.match/ |
D | inverted_character_classes.pass.cpp | 10 // <regex> 16 #include <regex> 20 assert(std::regex_match("X", std::regex("[X]"))); in main() 21 assert(std::regex_match("X", std::regex("[XY]"))); in main() 22 assert(!std::regex_match("X", std::regex("[^X]"))); in main() 23 assert(!std::regex_match("X", std::regex("[^XY]"))); in main() 25 assert(std::regex_match("X", std::regex("[\\S]"))); in main() 26 assert(!std::regex_match("X", std::regex("[^\\S]"))); in main() 28 assert(!std::regex_match("X", std::regex("[\\s]"))); in main() 29 assert(std::regex_match("X", std::regex("[^\\s]"))); in main() [all …]
|
D | parse_curly_brackets.pass.cpp | 10 // <regex> 22 #include <regex> 31 std::regex regex(re); in test1() local 33 assert((std::regex_match(target, smatch, regex))); in test1() 41 std::regex regex(re, std::regex::extended); in test2() local 43 assert((std::regex_match(target, smatch, regex))); in test2() 51 std::regex regex(re, std::regex::awk); in test3() local 53 assert((std::regex_match(target, smatch, regex))); in test3() 61 std::regex regex(re, std::regex::egrep); in test4() local 63 assert((std::regex_match(target, smatch, regex))); in test4()
|
/external/swiftshader/third_party/llvm-subzero/include/llvm/Support/ |
D | Regex.h | 1 //===-- Regex.h - Regular Expression matcher implementation -*- C++ -*-----===// 28 class Regex { 46 Regex(); 47 /// Compiles the given regular expression \p Regex. 48 Regex(StringRef Regex, unsigned Flags = NoFlags); 49 Regex(const Regex &) = delete; 50 Regex &operator=(Regex regex) { 51 std::swap(preg, regex.preg); 52 std::swap(error, regex.error); 55 Regex(Regex &®ex); [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Support/ |
D | Regex.h | 1 //===-- Regex.h - Regular Expression matcher implementation -*- C++ -*-----===// 28 class Regex { 46 Regex(); 47 /// Compiles the given regular expression \p Regex. 48 Regex(StringRef Regex, unsigned Flags = NoFlags); 49 Regex(const Regex &) = delete; 50 Regex &operator=(Regex regex) { 51 std::swap(preg, regex.preg); 52 std::swap(error, regex.error); 55 Regex(Regex &®ex); [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Support/ |
D | Regex.cpp | 1 //===-- Regex.cpp - Regular Expression matcher implementation -------------===// 14 #include "llvm/Support/Regex.h" 22 // xlocale.h, this will cause trouble, because of missing regex-related types. 27 Regex::Regex() : preg(nullptr), error(REG_BADPAT) {} in Regex() function in Regex 29 Regex::Regex(StringRef regex, unsigned Flags) { in Regex() argument 32 preg->re_endp = regex.end(); in Regex() 39 error = llvm_regcomp(preg, regex.data(), flags|REG_PEND); in Regex() 42 Regex::Regex(Regex &®ex) { in Regex() argument 43 preg = regex.preg; in Regex() 44 error = regex.error; in Regex() [all …]
|
/external/swiftshader/third_party/LLVM/utils/unittest/googletest/ |
D | gtest-port.cc | 117 // regfree'ing an invalid regex might crash because the content in ~RE() 118 // of the regex is undefined. Since the regex's are essentially in ~RE() 145 void RE::Init(const char* regex) { in Init() argument 146 pattern_ = posix::StrDup(regex); in Init() 150 const size_t full_regex_len = strlen(regex) + 10; in Init() 153 snprintf(full_pattern, full_regex_len, "^(%s)$", regex); in Init() 160 // Some implementation of POSIX regex (e.g. on at least some in Init() 162 // regex. We change it to an equivalent form "()" to be safe. in Init() 164 const char* const partial_regex = (*regex == '\0') ? "()" : regex; in Init() 168 << "Regular expression \"" << regex in Init() [all …]
|
/external/google-breakpad/src/testing/gtest/src/ |
D | gtest-port.cc | 142 // regfree'ing an invalid regex might crash because the content in ~RE() 143 // of the regex is undefined. Since the regex's are essentially in ~RE() 170 void RE::Init(const char* regex) { in Init() argument 171 pattern_ = posix::StrDup(regex); in Init() 175 const size_t full_regex_len = strlen(regex) + 10; in Init() 178 snprintf(full_pattern, full_regex_len, "^(%s)$", regex); in Init() 185 // Some implementation of POSIX regex (e.g. on at least some in Init() 187 // regex. We change it to an equivalent form "()" to be safe. in Init() 189 const char* const partial_regex = (*regex == '\0') ? "()" : regex; in Init() 193 << "Regular expression \"" << regex in Init() [all …]
|
/external/llvm/utils/unittest/googletest/src/ |
D | gtest-port.cc | 117 // regfree'ing an invalid regex might crash because the content in ~RE() 118 // of the regex is undefined. Since the regex's are essentially in ~RE() 145 void RE::Init(const char* regex) { in Init() argument 146 pattern_ = posix::StrDup(regex); in Init() 150 const size_t full_regex_len = strlen(regex) + 10; in Init() 153 snprintf(full_pattern, full_regex_len, "^(%s)$", regex); in Init() 160 // Some implementation of POSIX regex (e.g. on at least some in Init() 162 // regex. We change it to an equivalent form "()" to be safe. in Init() 164 const char* const partial_regex = (*regex == '\0') ? "()" : regex; in Init() 168 << "Regular expression \"" << regex in Init() [all …]
|
/external/swiftshader/third_party/llvm-subzero/lib/Support/ |
D | Regex.cpp | 1 //===-- Regex.cpp - Regular Expression matcher implementation -------------===// 14 #include "llvm/Support/Regex.h" 22 Regex::Regex() : preg(nullptr), error(REG_BADPAT) {} in Regex() function in Regex 24 Regex::Regex(StringRef regex, unsigned Flags) { in Regex() argument 27 preg->re_endp = regex.end(); in Regex() 34 error = llvm_regcomp(preg, regex.data(), flags|REG_PEND); in Regex() 37 Regex::Regex(Regex &®ex) { in Regex() argument 38 preg = regex.preg; in Regex() 39 error = regex.error; in Regex() 40 regex.preg = nullptr; in Regex() [all …]
|
/external/swiftshader/third_party/llvm-7.0/llvm/utils/unittest/googletest/include/gtest/ |
D | gtest-death-test.h | 102 // On POSIX-compliant systems (*nix), we use the <regex.h> library, 103 // which uses the POSIX extended regex syntax. 105 // On other platforms (e.g. Windows), we only support a simple regex 109 // or POSIX extended regex syntax. For example, we don't support 114 // subset of both PCRE and POSIX extended regex, so it's easy to 141 // If you accidentally use PCRE or POSIX extended regex features 147 // as a compiled regex library, but should perform well enough for a 167 // that matches regex. 168 # define ASSERT_EXIT(statement, predicate, regex) \ argument 169 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) [all …]
|
/external/libaom/libaom/third_party/googletest/src/googletest/include/gtest/ |
D | gtest-death-test.h | 102 // On POSIX-compliant systems (*nix), we use the <regex.h> library, 103 // which uses the POSIX extended regex syntax. 105 // On other platforms (e.g. Windows), we only support a simple regex 109 // or POSIX extended regex syntax. For example, we don't support 114 // subset of both PCRE and POSIX extended regex, so it's easy to 141 // If you accidentally use PCRE or POSIX extended regex features 147 // as a compiled regex library, but should perform well enough for a 167 // that matches regex. 168 # define ASSERT_EXIT(statement, predicate, regex) \ argument 169 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) [all …]
|
/external/google-breakpad/src/testing/gtest/include/gtest/ |
D | gtest-death-test.h | 102 // On POSIX-compliant systems (*nix), we use the <regex.h> library, 103 // which uses the POSIX extended regex syntax. 105 // On other platforms (e.g. Windows), we only support a simple regex 109 // or POSIX extended regex syntax. For example, we don't support 114 // subset of both PCRE and POSIX extended regex, so it's easy to 141 // If you accidentally use PCRE or POSIX extended regex features 147 // as a compiled regex library, but should perform well enough for a 167 // that matches regex. 168 # define ASSERT_EXIT(statement, predicate, regex) \ argument 169 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) [all …]
|
/external/mesa3d/src/gtest/include/gtest/ |
D | gtest-death-test.h | 102 // On POSIX-compliant systems (*nix), we use the <regex.h> library, 103 // which uses the POSIX extended regex syntax. 105 // On other platforms (e.g. Windows), we only support a simple regex 109 // or POSIX extended regex syntax. For example, we don't support 114 // subset of both PCRE and POSIX extended regex, so it's easy to 141 // If you accidentally use PCRE or POSIX extended regex features 147 // as a compiled regex library, but should perform well enough for a 167 // that matches regex. 168 # define ASSERT_EXIT(statement, predicate, regex) \ argument 169 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) [all …]
|
/external/libvpx/libvpx/third_party/googletest/src/include/gtest/ |
D | gtest-death-test.h | 103 // 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 168 // that matches regex. 169 # define ASSERT_EXIT(statement, predicate, regex) \ argument 170 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) [all …]
|
/external/googletest/googletest/include/gtest/ |
D | gtest-death-test.h | 103 // 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) \ argument 169 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) [all …]
|
/external/llvm/utils/unittest/googletest/include/gtest/ |
D | gtest-death-test.h | 91 // On POSIX-compliant systems (*nix), we use the <regex.h> library, 92 // which uses the POSIX extended regex syntax. 94 // On other platforms (e.g. Windows), we only support a simple regex 98 // or POSIX extended regex syntax. For example, we don't support 103 // subset of both PCRE and POSIX extended regex, so it's easy to 130 // If you accidentally use PCRE or POSIX extended regex features 136 // as a compiled regex library, but should perform well enough for a 156 // that matches regex. 157 # define ASSERT_EXIT(statement, predicate, regex) \ argument 158 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) [all …]
|
/external/swiftshader/third_party/LLVM/utils/unittest/googletest/include/gtest/ |
D | gtest-death-test.h | 91 // On POSIX-compliant systems (*nix), we use the <regex.h> library, 92 // which uses the POSIX extended regex syntax. 94 // On other platforms (e.g. Windows), we only support a simple regex 98 // or POSIX extended regex syntax. For example, we don't support 103 // subset of both PCRE and POSIX extended regex, so it's easy to 130 // If you accidentally use PCRE or POSIX extended regex features 136 // as a compiled regex library, but should perform well enough for a 156 // that matches regex. 157 # define ASSERT_EXIT(statement, predicate, regex) \ argument 158 GTEST_DEATH_TEST_(statement, predicate, regex, GTEST_FATAL_FAILURE_) [all …]
|
/external/libcxx/utils/google-benchmark/src/ |
D | re.h | 25 // No explicit regex selection; detect based on builtin hints. 33 // Prefer C regex libraries when compiling w/o exceptions so that we can 42 #include <regex> 46 #include <regex.h> 61 class Regex { 63 Regex() : init_(false) {} in Regex() function 65 ~Regex(); 80 std::regex re_; 90 inline bool Regex::Init(const std::string& spec, std::string* error) { in Init() 96 re_ = std::regex(spec, std::regex_constants::extended); in Init() [all …]
|
/external/google-benchmark/src/ |
D | re.h | 25 // No explicit regex selection; detect based on builtin hints. 33 // Prefer C regex libraries when compiling w/o exceptions so that we can 42 #include <regex> 46 #include <regex.h> 61 class Regex { 63 Regex() : init_(false) {} in Regex() function 65 ~Regex(); 80 std::regex re_; 90 inline bool Regex::Init(const std::string& spec, std::string* error) { in Init() 96 re_ = std::regex(spec, std::regex_constants::extended); in Init() [all …]
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/ |
D | UnicodeRegex.java | 26 import java.util.regex.Pattern; 34 * Contains utilities to supplement the JDK Regex, since it doesn't handle 44 // particularly for the regex style supported. 67 * to Java Regex, bringing it up to Level 1 (see 69 * regex pattern string and interpreting the character classes (\p{...}, 71 * this utility, Java regex expressions can be updated to work with the 74 * consistent with Java regex, so be careful of the differences. 76 * <p>In the future, we may extend this to support other regex packages. 78 * @regex A modified Java regex pattern, as in the input to 82 * @return A processed Java regex pattern, suitable for input to [all …]
|
/external/icu/android_icu4j/src/main/java/android/icu/impl/ |
D | UnicodeRegex.java | 27 import java.util.regex.Pattern; 35 * Contains utilities to supplement the JDK Regex, since it doesn't handle 46 // particularly for the regex style supported. 69 * to Java Regex, bringing it up to Level 1 (see 71 * regex pattern string and interpreting the character classes (\p{...}, 73 * this utility, Java regex expressions can be updated to work with the 76 * consistent with Java regex, so be careful of the differences. 78 * <p>In the future, we may extend this to support other regex packages. 80 * @regex A modified Java regex pattern, as in the input to 84 * @return A processed Java regex pattern, suitable for input to [all …]
|