Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text.RegularExpressions;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace TFYA_lab13
- {
- class Program
- {
- static void Main(string[] args)
- {
- Regex regex = new Regex(@"[00-23]{2}");
- Console.WriteLine("Введите строку");
- string check = Console.ReadLine();
- if(regex.IsMatch(check))
- {
- Console.WriteLine("Строка введена верно");
- }
- else
- {
- Console.WriteLine("Строка введена неверно");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement