bool StringMatching::matchPattern(
        const char* pattern,
        const char* str)
{
    std::string path(pattern);
    std::string spec(str);

    replace_all(pattern, "*", ".*");
    replace_all(pattern, "?", ".");

    std::regex path_regex(path);
    std::smatch spec_match;
    if (std::regex_match(spec, spec_match, path_regex))
    {
        return true;
    }

    return false;
}
bool StringMatching::matchPattern(
        const char* pattern,
        const char* str)
{
    std::string path(pattern);
    std::string spec(str);

    replace_all(pattern, "*", ".*");
    replace_all(pattern, "?", ".");

    std::regex path_regex(path);
    std::smatch spec_match;
    if (std::regex_match(spec, spec_match, path_regex))
    {
        return true;
    }

    return false;
}