SHARE
TWEET

Untitled

a guest Jun 24th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string AddressUnparsed = "collectief@test.nl";
  2. smatch matchesAddress;
  3.  
  4. if (regex_search(AddressUnparsed, matchesAddress, regex("([^@\s]+@[^@\s]+\.[a-zA-Z]{2,})", regex_constants::ECMAScript | regex_constants::icase))) {
  5.     cout << "Match!. The emailaddress is: " << matchesAddress[1] << endl;
  6. }
  7. else {
  8.     cout << "No match!" << endl;
  9. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top