im trying to validate passwords on my servlet using the following requirments
o The   password    must    consist of  one number  and one of  the following
special characters: !@#$%^&*()
Note: 1! and !1 are both valid passwords
the regex ive been trying to get to work is
?=.*[a-zA-Z])(?=.*\\d)(?=.*[!@#$%&*()_+=|<>?{}\\[\\]~-])
but it does not take 1! or !1
 
     
    