title: RegExr in SQL password check Procedure
body: <p>I have an procedure to check password in SQL server, but its wrong, can someone explain and help me ?
  If the password not contain 1 upper letter, 1 number and minium 8 charracter, this procedure will return an message.</p>
  <pre><code>CREATE OR ALTER PROCEDURE PaswordCompatibilityCheck
  @Password nvarchar(200),
  @ConfirmPassword nvarchar(200)
  AS
  BEGIN
      if @Password NOT LIKE '%(?=.*\d)(?=.*[A-Z]).{8,}%'
      BEGIN
           SELECT 'The password must contain at least 1 capital letter and 1 number, minimum of 8 characters' as message, 'Error' as type
      RETURN -- We need return here for exit the procedure.
      END
  END
  ----EXEC PaswordCompatibilityCheck 'PassWord101','PassWord101'
  </code></pre>