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.RegularExpressions;
- using System.Threading.Tasks;
- namespace _05.Match_Full_Name
- {
- class Program
- {
- static void Main(string[] args)
- {
- String text = Console.ReadLine();
- String pattern = @"\b([A-Z]{1}[a-z]+) ([A-Z]{1}[a-z]+)\b";
- MatchCollection matches = Regex.Matches(text, pattern);
- foreach (Match i in matches)
- {
- Console.Write(String.Join(" ", i.Groups[0]) + " ");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment