Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Text.RegularExpressions;
- using System.Threading.Tasks;
- namespace _5.Magic_exchangeable_words
- {
- class Program
- {
- static void Main(string[] args)
- {
- string patter = @"[A-Za-z.-0-9._]+@[A-Za-z.-]+[A-Za-z]+\.-?\w+";
- Regex regex = new Regex(patter);
- string text = Console.ReadLine();
- MatchCollection matches = regex.Matches(text);
- foreach (Match match in matches)
- {
- Console.WriteLine(match);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement