On Thu, Dec 24, 2020 at 4:09 AM Sadaka Technology <sersada...@outlook.com> wrote: > > hello guys, > > I have this pattern for password validation (regex): > > I want these rules to be applied: > > Minimum 8 characters. > The alphabets must be between [a-z] > At least one alphabet should be of Upper Case [A-Z] > At least 1 number or digit between [0-9]. > At least 1 character from [ _ or @ or $ ]. > > and this pattern: > > passwordpattern = > "^(?=.[a-z])(?=.[A-Z])(?=.\d)(?=.[@$])[A-Za-z\d@$!%?&]{8,}.$" > > my only issue is that I want to add the symbol () and symbol(.) in the > pattern where only it accepts $ and @, I tried adding generally like [@_$] > not working >
Easy solution: passwordpattern = ".{11,}" This mandates more security than the one you're using, AND it's far less frustrating for users. Please stop inflicting horrific password rules on the world. Especially, requiring one "symbol" - where "symbol" is always defined differently from one place to another (and in your case, you're offering just three valid options) - causes weaker passwords and more frustration. Just don't do it. ChrisA -- https://mail.python.org/mailman/listinfo/python-list