fork download
  1. #include <iostream>
  2. #include <vector>
  3. #include <regex>
  4.  
  5. int main() {
  6. const std::regex includeRegex("_ZN7grapple4vars((\\d+[a-zA-Z_]+)+)");
  7. std::smatch match;
  8. std::string test = "_ZN7grapple4vars3isr5hello";
  9.  
  10. if (std::regex_search(test, match, includeRegex)) {
  11. std::cout << match[1] << '\n';
  12. }
  13.  
  14. std::cout << match.size() << '\n';
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
3isr5hello
3