Lines Matching refs:Regex
1 //===-- Regex.cpp - Regular Expression matcher implementation -------------===//
14 #include "llvm/Support/Regex.h"
22 Regex::Regex(StringRef regex, unsigned Flags) {
25 preg->re_endp = regex.end();
32 error = llvm_regcomp(preg, regex.data(), flags|REG_PEND);
35 Regex::~Regex() {
42 bool Regex::isValid(std::string &Error) {
53 /// getNumMatches - In a valid regex, return the number of parenthesized
55 unsigned Regex::getNumMatches() const {
59 bool Regex::match(StringRef String, SmallVectorImpl<StringRef> *Matches){
98 std::string Regex::sub(StringRef Repl, StringRef String,
177 bool Regex::isLiteralERE(StringRef Str) {
178 // Check for regex metacharacters. This list was derived from our regex
184 std::string Regex::escape(StringRef String) {