Re: using regex for password validation

2020-12-23 Thread Chris Angelico
On Thu, Dec 24, 2020 at 12:56 PM dn via Python-list wrote: > > On 24/12/2020 12:25, Chris Angelico wrote: > > On Thu, Dec 24, 2020 at 9:42 AM dn via Python-list > > wrote: > >> Hang-on though, look at how much 'work' is involved, compared with a > >> single line of RegEx! Why go to such bother? T

Re: using regex for password validation

2020-12-23 Thread dn via Python-list
On 24/12/2020 12:25, Chris Angelico wrote: On Thu, Dec 24, 2020 at 9:42 AM dn via Python-list wrote: Hang-on though, look at how much 'work' is involved, compared with a single line of RegEx! Why go to such bother? There's several reasons. Good question! Look at this alternative: def validat

Re: using regex for password validation

2020-12-23 Thread dn via Python-list
On 24/12/2020 12:20, 2qdxy4rzwzuui...@potatochowder.com wrote: On 2020-12-24 at 11:41:15 +1300, dn via Python-list wrote: On 24/12/2020 06:03, Sadaka Technology wrote: hello guys, I have this pattern for password validation (regex): [...] Is it my imagination, or does a password in which

Re: using regex for password validation

2020-12-23 Thread Chris Angelico
On Thu, Dec 24, 2020 at 10:21 AM <2qdxy4rzwzuui...@potatochowder.com> wrote: > If you're going to wander out of ASCII, then don't forget to address > Unicode confusables. Nothing is more embarrassing than scribbling your > complicated password on a sticky note and then not being able to tell > the

Re: using regex for password validation

2020-12-23 Thread Chris Angelico
On Thu, Dec 24, 2020 at 9:42 AM dn via Python-list wrote: > Hang-on though, look at how much 'work' is involved, compared with a > single line of RegEx! Why go to such bother? There's several reasons. Good question! Look at this alternative: def validate_password(attempt): return len(attempt

Re: using regex for password validation

2020-12-23 Thread 2QdxY4RzWzUUiLuE
On 2020-12-24 at 11:41:15 +1300, dn via Python-list wrote: > On 24/12/2020 06:03, Sadaka Technology wrote: > > hello guys, > > > > I have this pattern for password validation (regex): [...] > > passwordpattern = > > "^(?=.[a-z])(?=.[A-Z])(?=.\d)(?=.[@$])[A-Za-z\d@$!%?&]{8,}.$" > > > > my onl

Re: using regex for password validation

2020-12-23 Thread dn via Python-list
On 24/12/2020 06:03, Sadaka Technology 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

Re: using regex for password validation

2020-12-23 Thread Chris Angelico
On Thu, Dec 24, 2020 at 4:09 AM Sadaka Technology 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

Re: using regex for password validation

2020-12-23 Thread Grant Edwards
On 2020-12-23, Mats Wichmann wrote: > Telling someone the password they tried to propose doesn't meet the > policy isn't performance sensitive, since it is a human-interactive > process, so it's okay to be a little slower and a lot clearer (that's > not even a Python issue!) You're far, far b

Re: using regex for password validation

2020-12-23 Thread MRAB
On 2020-12-23 17:03, Sadaka Technology 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

Re: using regex for password validation

2020-12-23 Thread Mats Wichmann
On 12/23/20 10:03 AM, Sadaka Technology 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-

using regex for password validation

2020-12-23 Thread Sadaka Technology
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 $ ]. a