equal to a string of at least 8 characters javascript code example Example: js regex password str.match(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[a-zA-Z]).{8,}$/)