settings: enable regexes by default and add support for perl syntax

This commit is contained in:
Andrzej Rybczak
2015-05-02 15:05:50 +02:00
parent dafcadefaf
commit 8f646e0f5c
4 changed files with 8 additions and 4 deletions

View File

@@ -578,10 +578,12 @@ bool Configuration::read(const std::vector<std::string> &config_paths)
regex_type = boost::regex::basic;
else if (v == "extended")
regex_type = boost::regex::extended;
else if (v == "perl")
regex_type = boost::regex::perl;
else
throw std::runtime_error("invalid argument: " + v);
regex_type |= boost::regex::icase;
}, defaults_to(regex_type, boost::regex::literal | boost::regex::icase)
}, defaults_to(regex_type, boost::regex::basic | boost::regex::icase)
));
p.add("ignore_leading_the", yes_no(
ignore_leading_the, false