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 Match_Name
- {
- class Program
- {
- static void Main(string[] args)
- {
- string input = Console.ReadLine();
- string pattern = @"\b[A-Z]{1}[a-z]+\s[A-Z]{1}[a-z]+\b";
- Regex regex = new Regex(pattern);
- Match output = regex.Match(input);
- while (output.Success)
- {
- Console.Write(output.Value + " ");
- output = output.NextMatch();
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement