Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <regex>
- #include <iterator>
- #include <string>
- using namespace std;
- int main()
- {
- string str;
- regex fit(R"(([0-1][0-9]|2[0-3]):[0-5][0-9])");
- while (getline(cin, str))
- {
- regex_iterator<string::iterator> rit(str.begin(), str.end(), fit);
- regex_iterator<string::iterator> rend;
- while (rit != rend)
- {
- cout << rit->str() << endl;
- ++rit;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement