Created
February 17, 2020 16:11
-
-
Save jagmit/62760eea6332ef90282fa8fcfc08fa08 to your computer and use it in GitHub Desktop.
Parse email addresses
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RegExp exp = new RegExp(r"(([a-zA-Z\s,.]+)<)*?([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]*)>?"); | |
String str = "Tilo Zimmermann <tt@tblub.de>, Henning Pfennig <hp@gov.co.uk>; Karsten, Chopin <kh@blub.de>; jagmit.bling@bmx.de, tim@cool.de, christian+eins@test.org<christian+eins@test.org>,"; | |
Iterable<RegExpMatch> matches = exp.allMatches(str); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment