Lines Matching defs:preg
24 Regex::Regex() : preg(nullptr), error(REG_BADPAT) {}
28 preg = new llvm_regex();
29 preg->re_endp = regex.end();
36 error = llvm_regcomp(preg, regex.data(), flags|REG_PEND);
43 preg = regex.preg;
45 regex.preg = nullptr;
50 if (preg) {
51 llvm_regfree(preg);
52 delete preg;
59 void RegexErrorToString(int error, struct llvm_regex *preg,
61 size_t len = llvm_regerror(error, preg, nullptr, 0);
64 llvm_regerror(error, preg, &Error[0], len);
73 RegexErrorToString(error, preg, Error);
80 return preg->re_nsub;
93 unsigned nmatch = Matches ? preg->re_nsub+1 : 0;
105 int rc = llvm_regexec(preg, String.data(), nmatch, pm.data(), REG_STARTEND);
113 RegexErrorToString(error, preg, *Error);