Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. std::string subject("This is a test test");
  2. try {
  3. std::regex re("\w+");
  4. std::sregex_iterator next(subject.begin(), subject.end(), re);
  5. std::sregex_iterator end;
  6. while (next != end) {
  7. std::smatch match = *next;
  8. std::cout << match.str() << "n";
  9. std::cout << match.size() << " count" << std::endl;
  10. next++;
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement