xref: /third_party/benchmark/cmake/std_regex.cpp
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/benchmark/cmake/
1a8c51b3fSopenharmony_ci#include <regex>
2a8c51b3fSopenharmony_ci#include <string>
3a8c51b3fSopenharmony_ciint main() {
4a8c51b3fSopenharmony_ci  const std::string str = "test0159";
5a8c51b3fSopenharmony_ci  std::regex re;
6a8c51b3fSopenharmony_ci  re = std::regex("^[a-z]+[0-9]+$",
7a8c51b3fSopenharmony_ci       std::regex_constants::extended | std::regex_constants::nosubs);
8a8c51b3fSopenharmony_ci  return std::regex_search(str, re) ? 0 : -1;
9a8c51b3fSopenharmony_ci}
10a8c51b3fSopenharmony_ci
11

Indexes created Thu Nov 07 10:32:03 CST 2024