Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <regex>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL, "ru");
- SinglyLinkedList<int> list;
- string inputline;
- cmatch res;
- regex regular("^(\\d+\\s*)+$"); //для проверки
- getline(cin, inputline);
- if (!(regex_match(inputline.c_str(), regular)))
- cout << "sosi xui";
- regex reg("^[(\\d+)\\s*]+$"); //для захвата
- if (regex_search(inputline.c_str(), res, reg))
- for (size_t i = 1; i < res.size(); ++i)
- cout << res[i] << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement