using System.Text.RegularExpressions;
public static readonly Regex PasswordRequirementsRegex = new Regex("^((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*^[a-zA-Z0-9]).{8,})", RegexOptions.Compiled);
public static void Main()
Console.WriteLine(PasswordRequirementsRegex.IsMatch("Password"));
Console.WriteLine(PasswordRequirementsRegex.IsMatch("P1234_"));
Console.WriteLine(PasswordRequirementsRegex.IsMatch("Password1234!"));
Console.WriteLine(PasswordRequirementsRegex.IsMatch("Password1234@!"));