Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text;
- using System.Text.RegularExpressions;
- class MainClass
- {
- public static void Main (string[] args)
- {
- string all_domen = @"(([-A-Za-z0-9]{1,63}\.)+[a-z]{2,4})";
- string mailbox = $@"\w+";
- string pattern = $@"{mailbox}@{all_domen}";
- string str;
- while((str = Console.ReadLine())!= null)
- foreach (Match match in Regex.Matches(str, pattern))
- Console.WriteLine(match.Value);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement