Tag Archives: Regular Expressions

Complex password validation with regular expression

Our team had to build a password validation regular expression for a client that had the following requirements. Below is the expression for anyone that needs anything like this. Hopefully I safe someone some time. ^(?=.{16,})(?=.*[1-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[(!@#$%^&*()_+|~\- =\`{}[\]:”;'<>?,.\/, )])(?!.*(.)\1).+$ Length 16 characters At least one number At least one lowercase character At least one uppercase character At… Read More »