Lines Matching refs:Regex
1 //===-- Regex.h - Regular Expression matcher implementation -*- C++ -*-----===//
29 class Regex {
47 /// Compiles the given regular expression \p Regex.
48 Regex(StringRef Regex, unsigned Flags = NoFlags);
49 Regex(const Regex &) LLVM_DELETED_FUNCTION;
50 Regex &operator=(Regex regex) {
51 std::swap(preg, regex.preg);
52 std::swap(error, regex.error);
55 Regex(Regex &®ex) {
56 preg = regex.preg;
57 error = regex.error;
58 regex.preg = nullptr;
60 ~Regex();
62 /// isValid - returns the error encountered during regex compilation, or
66 /// getNumMatches - In a valid regex, return the number of parenthesized
68 /// many entries plus one for the whole regex (as element 0).
71 /// matches - Match the regex against a given \p String.
80 /// sub - Return the result of replacing the first match of the regex in
97 /// \brief Turn String into a regex by escaping its special characters.