Copy link to clipboard
Copied
Hi,
I'm awful with regular expressions most likely because I haven't spent much time writing them but I'd like to have one that does the following
Requirements
1. Must be a minimum of 7 characters
2. Must have at least 3 out 4 of the following
2a) 1 Uppercase letter
2b) 1 Lowercase letter
2c) 1 Number
2d) 1 Symbol
So I want to pass in a string, and then run it against a regex that does the above.
Any help appreciated
-ws
Did you google for "password validation regex" or something like that, to see how people have resolved this issue in the past?
--
Adam
Copy link to clipboard
Copied
Did you google for "password validation regex" or something like that, to see how people have resolved this issue in the past?
--
Adam
Copy link to clipboard
Copied
Hi,
@Adam - I did Google, but not enough.
The link turned out to be exactly what I was looking for.
Thanks again...
Copy link to clipboard
Copied
Cool, glad you got it sorted. Sorry for the oblique response, but I reckon it's more handy to help guide people in the right direction to find the answer for themselves than to just blurt it out.
--
Adam
Copy link to clipboard
Copied
Typically, providing guidance does work as you've suggested, and blurting something isn't that helpful I guess, but I think there is a medium between pointing someone to Google and blurting out the solution.
Everyone knows about Google, saying go to Google doesn't add much value to be honest. Nor does spelling the answer out to a given problem, but there's definitely a middle ground and I guess that's what I was looking for.
Either way, you've assisted me before so I can't complain.
Thanks again... your one of the few folks that are active here...
-ws
Copy link to clipboard
Copied
You would be surprised at the number of people that it never occurs to to investigate something themselves before trying to get someone else to be their brains for them. I'm not saying this was the case with you, but then again you didn't give any evidence to suggest you had done any of your own investigation either, so I asked if you had. And, what's more, I gave you a google search string that gives you the answer in the first search result, ie: I didn't just say "have you googled it?" I said "have you googled [THIS]", knowing it would give you the answer if you searched on that string. It wasn't a random suggestion.
So maybe not as unhelpful or obtuse as you might think?
Anyway, whatever. No worries.
--
Adam
Copy link to clipboard
Copied