7 if(std::regex_search(line, std::regex(
"(\\s)+(-)?(\\d)+//(-)?(\\d)+(\\s)+"))) {
8 tmp = std::regex_replace(line, std::regex(
"(-)?(\\d)+//(-)?(\\d)+"), std::string(
"V"));
9 }
else if(std::regex_search(line, std::regex(
"(\\s)+(-)?(\\d)+/(-)?(\\d)+(\\s)+"))) {
10 tmp = std::regex_replace(line, std::regex(
"(-)?(\\d)+/(-)?(\\d)+"), std::string(
"V"));
11 }
else if(std::regex_search(line, std::regex(
"(\\s)+(-)?(\\d)+/(-)?(\\d)+/(-)?(\\d)+(\\s)+"))) {
12 tmp = std::regex_replace(line, std::regex(
"(-)?(\\d)+/(-)?(\\d)+/(-)?(\\d)+"), std::string(
"V"));
14 tmp = std::regex_replace(line, std::regex(
"(-)?(\\d)+"), std::string(
"V"));
16 return static_cast<int>(std::count(tmp.begin(), tmp.end(),
'V'));
21 bool test = (
parse_line(
"f 7/7/7 -3/3/-3 2/-2/2") == 3) &&
int parse_line(std::string const &line)