Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text.RegularExpressions;
- class ExtractEmailAddresses
- {
- static void Main()
- {
- Console.WriteLine("Extract all email addresses from given text\n");
- string text = "Extract all email addresses from [email protected]. System.Globalization,[email protected] hello";
- foreach (var detail in Regex.Matches(text, @"\w+@\w+\.\w+"))
- {
- Console.WriteLine(detail);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment