Forked from arielweinberger/strong-password-regex.md
          
        
    
          Created
          January 26, 2021 18:32 
        
      - 
      
- 
        Save faultyagatha/0914033a096880d06427a89d86b33b31 to your computer and use it in GitHub Desktop. 
Revisions
- 
        arielweinberger revised this gist Jun 4, 2019 . 1 changed file with 6 additions and 9 deletions.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,9 @@ * Passwords will contain at least 1 upper case letter * Passwords will contain at least 1 lower case letter * Passwords will contain at least 1 number or special character * There is **no** length validation (min, max) in this regex! Regular expression for JavaScript: ``` /((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/ ``` 
- 
        arielweinberger created this gist Jun 4, 2019 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ Passwords will contain at least 1 upper case letter Passwords will contain at least 1 lower case letter Passwords will contain at least 1 number or special character Passwords will contain at least 8 characters in length Password maximum length should not be arbitrarily limited Regular expression for JavaScript: ``` (?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$ ``` Credit goes to @ravibharathii