• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

RegEx Help Needed

Engaged ,
Jul 07, 2010 Jul 07, 2010

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

TOPICS
Advanced techniques

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jul 07, 2010 Jul 07, 2010

Did you google for "password validation regex" or something like that, to see how people have resolved this issue in the past?

--

Adam

Votes

Translate

Translate
LEGEND ,
Jul 07, 2010 Jul 07, 2010

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 09, 2010 Jul 09, 2010

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...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 12, 2010 Jul 12, 2010

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 12, 2010 Jul 12, 2010

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 12, 2010 Jul 12, 2010

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 07, 2010 Jul 07, 2010

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation