Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text.RegularExpressions;
- class Program
- {
- static void Main(string[] args)
- {
- Regex pattern = new Regex(@"(?<=^|,\s)([\w\-]{3,16})(?=$|,\s)");
- string input = Console.ReadLine();
- MatchCollection matches = pattern.Matches(input);
- foreach (var match in matches)
- {
- Console.WriteLine(match);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement