1. 비밀번호 복잡성 검증

정규표현식 : /^(?=.[a-z])(?=.[A-Z])(?=.\d)(?=.[^\da-zA-Z]).{8,}$/

function validatePassword(password) {
  const regex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[^\\da-zA-Z]).{8,}$/;
  console.log(regex.test(password));
}
validatePassword('Password123!'); // true
validatePassword('password123!'); // false
validatePassword('Password123'); // false
validatePassword('Password!'); // false

^(?=.[a-z])

(?=.*[A-Z])

(?=.*\d)

(?=.*[^\da-zA-Z])

.{8,}$