Regular Expression for validating the string
(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{8,20})$
The above RegEx requires at least one digit and at least one alphabetic character. It does not allow special characters. The length must be from 8 to 20 characters.

Leave a Reply