Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text.RegularExpressions;
- namespace ConsoleApp2
- {
- class Program
- {
- static void Main(string[] args)
- {
- List<string> psswrds = new List<string>() { "qwertY", "qwerty_1", "qwertyui", "qwertY_1", "C00l_Pass", "SupperPas1" };
- foreach (var p in psswrds)
- {
- var test = new Regex(@"^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])[\w]{8,}$").Match(p);
- Console.WriteLine(test.Success ? $"Пароль {p} подходит" : $"Пароль {p} не подходит");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement