1#include <regex>
2#include <string>
3int main() {
4 const std::string str = "test0159";
5 std::regex re;
6 re = std::regex("^[a-z]+[0-9]+$",
7 std::regex_constants::extended | std::regex_constants::nosubs);
8 return std::regex_search(s: str, e: re) ? 0 : -1;
9}
10
11

source code of third-party/benchmark/cmake/std_regex.cpp