Swedish SSN Regular expression reject users under a specific age
问题 I Have a problem with my regular expression. I have made it possible to valdiate correct swedish social security number to match these criteria. YYMMDDNNNN YYMMDD-NNNN YYYYMMDDNNNN YYYYMMDD-NNNN But i would also like to reject a user to register if the user is under 18 years old. My reqular expression is looking like this at the moment: Do anyone encountered the same problem with the age range Swedish SSN? private const string RegExForValidation = @"^(\d{6}|\d{8})[-|(\s)]{0,1}\d{4}$"; UPDATE