Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::string subject("This is a test test");
- try {
- std::regex re("\w+");
- std::sregex_iterator next(subject.begin(), subject.end(), re);
- std::sregex_iterator end;
- while (next != end) {
- std::smatch match = *next;
- std::cout << match.str() << "n";
- std::cout << match.size() << " count" << std::endl;
- next++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement