SHARE
TWEET

Untitled

a guest Dec 8th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Text.RegularExpressions;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace TFYA_lab13
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             Regex regex = new Regex(@"[00-23]{2}");
  15.             Console.WriteLine("Введите строку");
  16.             string check = Console.ReadLine();
  17.             if(regex.IsMatch(check))
  18.             {
  19.                 Console.WriteLine("Строка введена верно");
  20.             }
  21.             else
  22.             {
  23.                 Console.WriteLine("Строка введена неверно");
  24.             }
  25.         }
  26.     }
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top