5 #include <boost/algorithm/string.hpp> 14 std::regex rexp(regexp);
15 return std::regex_match(pattern, rexp);
19 return (pattern.find_first_of(
"*?") != pattern.npos);
24 boost::replace_all(regexp,
"*",
".*");
25 boost::replace_all(regexp,
"?",
".");
29 std::vector<std::vector<std::string>::const_iterator>
31 std::vector< std::vector<std::string>::const_iterator>
matches;
32 for (std::vector<std::string>::const_iterator
i = strings.begin(), iEnd = strings.end();
i != iEnd; ++
i) {
33 if (std::regex_match((*
i), regexp)) {
40 std::vector<std::vector<std::string>::const_iterator>
bool is_glob(std::string const &pattern)
std::string glob2reg(std::string const &pattern)
bool untaintString(char const *pattern, char const *regexp)
std::vector< std::vector< std::string >::const_iterator > regexMatch(std::vector< std::string > const &strings, std::regex const ®exp)