fork(9) download
  1. #include <iostream>
  2. #include <string>
  3. #include <regex>
  4. int main()
  5. {
  6. std::string strr("1.0.0.0029.443");
  7.  
  8. std::regex rgx("([0-9])");
  9. std::smatch match;
  10.  
  11. while(regex_search(strr, match, rgx))
  12. {
  13. std::cout << match[0] << std::endl;
  14. strr = match.suffix();
  15. }
  16. }
Success #stdin #stdout 0s 16168KB
stdin
Standard input is empty
stdout
1
0
0
0
0
2
9
4
4
3