Project

General

Profile

Bug #3668 » wt-3.3.4-rc1-WRegExp-full-match.patch

Laurence Withers, 12/10/2014 12:20 PM

View differences:

src/Wt/WRegExp.C
#else
if (valid_)
regfree(&rx_);
pattern_ = pattern;
int opt = REG_EXTENDED;
std::string p("^");
p += pattern.toUTF8().c_str();
p += "$";
pattern_ = p;
int opt = REG_EXTENDED | REG_NOSUB;
if (flags & MatchCaseInsensitive)
opt |= REG_ICASE;
valid_ = regcomp(&rx_, pattern.toUTF8().c_str(), opt) == 0;
int ret = regcomp(&rx_, pattern.toUTF8().c_str(), opt) == 0;
valid_ = (ret == 0);
if (ret) {
char errbuf[200];
regerror(ret, &rx_, errbuf, sizeof(errbuf));
LOG_ERROR("error parsing pattern '" << p << "': " << errbuf);
}
#endif
}
(4-4/4)