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;
- namespace exam
- {
- class exam
- {
- static void Main()
- {
- Regex pattern = new Regex(@"^(<\[[^a-zA-Z0-9]*\]\.){1}(\.\[[a-zA-Z0-9]*\]\.)*$");
- string input = Console.ReadLine();
- while (input != "Traincode!")
- {
- if (pattern.IsMatch(input))
- {
- Console.WriteLine(input);
- }
- input = Console.ReadLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement