I am trying to put the following rule in a regular expression to use in my javascript code but with no luck,
This is the rule: at least 2 characters including special characters, 2 digits and a minimum of length is 8
my regular expression
/^(?=(?:[^A-Za-z]*[A-Za-z]){2})(?=(?:\D*\d){2})[A-Za-z0-9]{8,}$/