What is the regex to make sure that a given string contains at least one lowercase character and one uppercase character but also my include number s and special characters !@#$%^&*()+=? ?
Does the order of the regex matter?
What is the regex to make sure that a given string contains at least one lowercase character and one uppercase character but also my include number s and special characters !@#$%^&*()+=? ?
Does the order of the regex matter?
You can use positive lookahead patterns to ensure that there are at least one uppercase and one lowercase characters, while using a character set to cover the rest of the allowed characters:
^(?=[a-z0-9!@#$%^&*()+=?]*[A-Z])(?=[A-Z0-9!@#$%^&*()+=?]*[a-z])[A-Za-z0-9!@#$%^&*()+=?]*$