| 89 | } // namespace Exiv2 |
| 90 | |
| 91 | static bool shouldOutput(const std::vector<std::regex>& greps, const char* key, const std::string& value) { |
| 92 | bool bPrint = greps.empty(); |
| 93 | for (auto const& g : greps) { |
| 94 | bPrint = std::regex_search(key, g) || std::regex_search(value, g); |
| 95 | if (bPrint) { |
| 96 | break; |
| 97 | } |
| 98 | } |
| 99 | return bPrint; |
| 100 | } |
| 101 | |
| 102 | static void output(std::ostream& os, const std::vector<std::regex>& greps, const char* name, const std::string& value) { |
| 103 | if (shouldOutput(greps, name, value)) |