28 bool isMatch(std::string_view node, std::string_view name) {
30 return (name == node);
32 std::regex pattern({name.data(), name.size()});
33 return std::regex_match(begin(node), end(node), pattern);
37 bool compareEqual(std::string_view node, std::string_view name) {
return (name == node); }
40 return std::regex_match(std::string(node.data(), node.size()), pattern);
45 : std::regex_match(name.begin(), name.end(), std::regex(std::string(selection))));
49 auto pos = name.rfind(
'[');
50 if (pos != name.npos) {
51 if (std::stoi(std::string(name.substr(pos + 1, name.rfind(
']')))) ==
copy) {
59 bool accepted(std::vector<std::regex>
const&
keys, std::string_view node) {
60 return (find_if(begin(
keys), end(
keys), [&](
const auto& n) ->
bool {
return compareEqual(node, n); }) !=
65 for(
unsigned int i = 0; i < filter->
isRegex.size(); i++ ) {
80 return (input.find(
".") != std::string_view::npos) || (input.find(
"*") != std::string_view::npos);
84 return (input.find(
":") != std::string_view::npos);
88 std::string_view
v = input;
89 auto first =
v.find_first_of(
"//");
90 v.remove_prefix(std::min(first + 2,
v.size()));
94 std::vector<std::string_view>
split(std::string_view str,
const char* delims) {
95 std::vector<std::string_view> ret;
97 std::string_view::size_type start = 0;
98 auto pos = str.find_first_of(delims, start);
99 while (pos != std::string_view::npos) {
101 ret.emplace_back(str.substr(start, pos - start));
104 pos = str.find_first_of(delims, start);
106 if (start < str.length())
107 ret.emplace_back(str.substr(start, str.length() - start));
112 std::string_view
v = input;
113 auto first =
v.find_first_of(
":");
114 v.remove_prefix(std::min(first + 1,
v.size()));