#include #include #include using namespace fmt; using namespace std; int main(int argc, char *argv[]) { smatch matches; regex to_test(argv[1]); string line(argv[2]); if(argc != 3) { println("USAGE: regtest "); } else { if(regex_match(line, matches, to_test)) { println("MATCHED: "); for(auto &match : matches) { println("\t{}", match.str()); } } else { println("NO MATCH"); } } }