I am new to regex and want to verify a string which contains user password and that should contains lowercase, uppercase, number and special character and must have length of 8 characters and maximum of 20 so how how can I limit this regex between 8 and 20 characters here is the regex :
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*(_|[^\w])).+$