Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int _tmain(int argc, _TCHAR* argv[])
- {
- string email1S = "abc 31432";
- cmatch results;
- regex mcn("([[:digit:]]+)");
- string::const_iterator curPosition = email1S.begin();
- if (regex_search(curPosition, email1S.cend(), results, mcn))
- {
- cout << "We have a match" << endl;
- cout << results[1].str() << endl;
- }
- curPosition += results[0].length();
- cin.get();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement