Regular Expression validation IssuesHow to validate an email address in JavaScript?What are valid values for the id attribute in HTML?What is the best regular expression to check if a string is a valid URL?Is there a regular expression to detect a valid regular expression?How to validate an email address using a regular expression?Regular expression to match a line that doesn't contain a wordHow do you access the matched groups in a JavaScript regular expression?Regular Expressions: Is there an AND operator?How do you use a variable in a regular expression?Regex to validate password strength

How do I write real-world stories separate from my country of origin?

Keeping the dodos out of the field

Is a world with one country feeding everyone possible?

Why is Ni[(PPh₃)₂Cl₂] tetrahedral?

What is the required burn to keep a satellite at a Lagrangian point?

How many wires should be in a new thermostat cable?

nginx conf: http2 module not working in Chrome in ubuntu 18.04

Is there any mention of ghosts who live outside the Hogwarts castle?

"Official wife" or "Formal wife"?

Why did Nick Fury not hesitate in blowing up the plane he thought was carrying a nuke?

Way of refund if scammed?

Proto-Indo-European (PIE) words with IPA

Is ideal gas incompressible?

Are there any tips to help hummingbirds find a new feeder?

How could the B-29 bomber back up under its own power?

If change in free energy (G) is positive, how do those reactions still occur?

Team member is vehemently against code formatting

Ratings matrix plot

Why do the i8080 I/O instructions take a byte-sized operand to determine the port?

Find this Unique UVC Palindrome ( ignoring signs and decimal) from Given Fractional Relationship

Wifi light switch needs neutral wire. Why? AND Can that wire be a skinny one?

Does science define life as "beginning at conception"?

Is there a word for pant sleeves?

If a character has cast the Fly spell on themselves, can they "hand off" to the Levitate spell without interruption?



Regular Expression validation Issues


How to validate an email address in JavaScript?What are valid values for the id attribute in HTML?What is the best regular expression to check if a string is a valid URL?Is there a regular expression to detect a valid regular expression?How to validate an email address using a regular expression?Regular expression to match a line that doesn't contain a wordHow do you access the matched groups in a JavaScript regular expression?Regular Expressions: Is there an AND operator?How do you use a variable in a regular expression?Regex to validate password strength






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I'm using the



^(?=^.14,30$)(?=^.[d]3$)(?=^.[a-z]4$)(?=^.[A-Z]5$)(?=^.[!*&#$%^]2).$


regular expression in order to validate the following as minimum requirements:



  1. Four low case letter

  2. Five Upper case letters

  3. Three digits

  4. Two special characters

  5. With total length between 14 to 30 characters long

But Unfortunately This validation pattern doesn't validate my string.

I've look for regex pattern validation and gives me that the pattern is OK

Can someone give me a support on this?










share|improve this question
























  • Four lower case letters or at least four? Consecutive or at any location? Your pattern is a mess. (?=^.[a-z]4$) requires a match of a 5 char string where the first one csn be any char and then there must be 4 lowercase letters. In the end, after ^ and lookaheads, there is . before $, so actually, the whole regex can match a single char string.

    – Wiktor Stribiżew
    Mar 23 at 21:13


















1















I'm using the



^(?=^.14,30$)(?=^.[d]3$)(?=^.[a-z]4$)(?=^.[A-Z]5$)(?=^.[!*&#$%^]2).$


regular expression in order to validate the following as minimum requirements:



  1. Four low case letter

  2. Five Upper case letters

  3. Three digits

  4. Two special characters

  5. With total length between 14 to 30 characters long

But Unfortunately This validation pattern doesn't validate my string.

I've look for regex pattern validation and gives me that the pattern is OK

Can someone give me a support on this?










share|improve this question
























  • Four lower case letters or at least four? Consecutive or at any location? Your pattern is a mess. (?=^.[a-z]4$) requires a match of a 5 char string where the first one csn be any char and then there must be 4 lowercase letters. In the end, after ^ and lookaheads, there is . before $, so actually, the whole regex can match a single char string.

    – Wiktor Stribiżew
    Mar 23 at 21:13














1












1








1








I'm using the



^(?=^.14,30$)(?=^.[d]3$)(?=^.[a-z]4$)(?=^.[A-Z]5$)(?=^.[!*&#$%^]2).$


regular expression in order to validate the following as minimum requirements:



  1. Four low case letter

  2. Five Upper case letters

  3. Three digits

  4. Two special characters

  5. With total length between 14 to 30 characters long

But Unfortunately This validation pattern doesn't validate my string.

I've look for regex pattern validation and gives me that the pattern is OK

Can someone give me a support on this?










share|improve this question
















I'm using the



^(?=^.14,30$)(?=^.[d]3$)(?=^.[a-z]4$)(?=^.[A-Z]5$)(?=^.[!*&#$%^]2).$


regular expression in order to validate the following as minimum requirements:



  1. Four low case letter

  2. Five Upper case letters

  3. Three digits

  4. Two special characters

  5. With total length between 14 to 30 characters long

But Unfortunately This validation pattern doesn't validate my string.

I've look for regex pattern validation and gives me that the pattern is OK

Can someone give me a support on this?







html regex vb.net






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 24 at 11:32







Lefteris Gkinis

















asked Mar 23 at 21:09









Lefteris GkinisLefteris Gkinis

64642258




64642258












  • Four lower case letters or at least four? Consecutive or at any location? Your pattern is a mess. (?=^.[a-z]4$) requires a match of a 5 char string where the first one csn be any char and then there must be 4 lowercase letters. In the end, after ^ and lookaheads, there is . before $, so actually, the whole regex can match a single char string.

    – Wiktor Stribiżew
    Mar 23 at 21:13


















  • Four lower case letters or at least four? Consecutive or at any location? Your pattern is a mess. (?=^.[a-z]4$) requires a match of a 5 char string where the first one csn be any char and then there must be 4 lowercase letters. In the end, after ^ and lookaheads, there is . before $, so actually, the whole regex can match a single char string.

    – Wiktor Stribiżew
    Mar 23 at 21:13

















Four lower case letters or at least four? Consecutive or at any location? Your pattern is a mess. (?=^.[a-z]4$) requires a match of a 5 char string where the first one csn be any char and then there must be 4 lowercase letters. In the end, after ^ and lookaheads, there is . before $, so actually, the whole regex can match a single char string.

– Wiktor Stribiżew
Mar 23 at 21:13






Four lower case letters or at least four? Consecutive or at any location? Your pattern is a mess. (?=^.[a-z]4$) requires a match of a 5 char string where the first one csn be any char and then there must be 4 lowercase letters. In the end, after ^ and lookaheads, there is . before $, so actually, the whole regex can match a single char string.

– Wiktor Stribiżew
Mar 23 at 21:13













3 Answers
3






active

oldest

votes


















2














Note that (?=^.[a-z]4$) requires a match of a 5 char string where the first one csn be any char and then there must be 4 lowercase letters. In the end, after ^ and lookaheads, there is . before $, so actually, the whole regex can match a single char string.



You may use



^(?=(?:D*d)3)(?=(?:[^a-z]*[a-z])4)(?=(?:[^A-Z]*[A-Z])5)(?=(?:[^!*&#$%^]*[!*&#$%^])2).8,30$


See the regex demo. A regulex graph:



enter image description here



Details




  • ^ - start of string


  • (?=(?:D*d)3) - three occurrences of any 0+ non-digits followed with a digit


  • (?=(?:[^a-z]*[a-z])4) - four occurrences of any 0+ chars other than a lowercase ASCII letters followed with a lowercase ASCII letter


  • (?=(?:[^A-Z]*[A-Z])5) - five occurrences of any 0+ chars other than an uppercase ASCII letters followed with an uppercase ASCII letter


  • (?=(?:[^!*&#$%^]*[!*&#$%^])2) - two occurrences of any 0+ chars other than some specific special chars (defined in the character class) followed with a char from the sepcified !*&#$%^ set


  • .8,30 - any 8 to 30 chars


  • $ - end of string.





share|improve this answer
































    0














    ^(?=.14,30$)(?=(?:.*[A-Z])5)(?=(?:.*[a-z])4)(?=(?:.*d)3)(?=(?:.*[!*&#$%^])2).*$
    └─────┬─────┘└───────┬────────┘└───────┬────────┘└──────┬──────┘└─────────┬──────────┘
    │ │ │ │ │
    │ │ │ │ 2 special characters
    │ │ │ │
    │ │ │ 3 digits
    │ │ │
    │ │ 4 lowercase letters
    │ │
    │ 5 uppercase letters

    string is 14-30 characters long



    ^(?=(?:.*[A-Z])5)(?=(?:.*[a-z])4)(?=(?:.*d)3)(?=(?:.*[!*&#$%^])2).(14,30)$
    └───────┬────────┘└───────┬────────┘└──────┬──────┘└─────────┬──────────┘
    │ │ │ │
    │ │ │ 2 special characters
    │ │ │
    │ │ 3 digits
    │ │
    │ 4 lowercase letters

    5 uppercase letters





    share|improve this answer
































      0














      Instead of a regex, which may be difficult to maintain, how about some simple code that is easy to read and modify:



      Private Function IsStringValid(s As String) As Boolean
      If (s.Length > 30) OrElse (s.Length < 14) Then
      Return False
      End If

      Dim lower, upper, digit, special As Integer
      For Each c As Char In s
      Select Case True
      Case Char.IsLower(c)
      lower += 1
      Case Char.IsUpper(c)
      upper += 1
      Case Char.IsDigit(c)
      digit += 1
      Case Char.IsSymbol(c) OrElse Char.IsPunctuation(c)
      special += 1
      End Select
      Next
      Return (lower >= 4) AndAlso (upper >= 5) AndAlso (digit >= 3) AndAlso (special >= 2)
      End Function


      Based on your requirements, the minimum length has to be 14.






      share|improve this answer

























        Your Answer






        StackExchange.ifUsing("editor", function ()
        StackExchange.using("externalEditor", function ()
        StackExchange.using("snippets", function ()
        StackExchange.snippets.init();
        );
        );
        , "code-snippets");

        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "1"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55318414%2fregular-expression-validation-issues%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        2














        Note that (?=^.[a-z]4$) requires a match of a 5 char string where the first one csn be any char and then there must be 4 lowercase letters. In the end, after ^ and lookaheads, there is . before $, so actually, the whole regex can match a single char string.



        You may use



        ^(?=(?:D*d)3)(?=(?:[^a-z]*[a-z])4)(?=(?:[^A-Z]*[A-Z])5)(?=(?:[^!*&#$%^]*[!*&#$%^])2).8,30$


        See the regex demo. A regulex graph:



        enter image description here



        Details




        • ^ - start of string


        • (?=(?:D*d)3) - three occurrences of any 0+ non-digits followed with a digit


        • (?=(?:[^a-z]*[a-z])4) - four occurrences of any 0+ chars other than a lowercase ASCII letters followed with a lowercase ASCII letter


        • (?=(?:[^A-Z]*[A-Z])5) - five occurrences of any 0+ chars other than an uppercase ASCII letters followed with an uppercase ASCII letter


        • (?=(?:[^!*&#$%^]*[!*&#$%^])2) - two occurrences of any 0+ chars other than some specific special chars (defined in the character class) followed with a char from the sepcified !*&#$%^ set


        • .8,30 - any 8 to 30 chars


        • $ - end of string.





        share|improve this answer





























          2














          Note that (?=^.[a-z]4$) requires a match of a 5 char string where the first one csn be any char and then there must be 4 lowercase letters. In the end, after ^ and lookaheads, there is . before $, so actually, the whole regex can match a single char string.



          You may use



          ^(?=(?:D*d)3)(?=(?:[^a-z]*[a-z])4)(?=(?:[^A-Z]*[A-Z])5)(?=(?:[^!*&#$%^]*[!*&#$%^])2).8,30$


          See the regex demo. A regulex graph:



          enter image description here



          Details




          • ^ - start of string


          • (?=(?:D*d)3) - three occurrences of any 0+ non-digits followed with a digit


          • (?=(?:[^a-z]*[a-z])4) - four occurrences of any 0+ chars other than a lowercase ASCII letters followed with a lowercase ASCII letter


          • (?=(?:[^A-Z]*[A-Z])5) - five occurrences of any 0+ chars other than an uppercase ASCII letters followed with an uppercase ASCII letter


          • (?=(?:[^!*&#$%^]*[!*&#$%^])2) - two occurrences of any 0+ chars other than some specific special chars (defined in the character class) followed with a char from the sepcified !*&#$%^ set


          • .8,30 - any 8 to 30 chars


          • $ - end of string.





          share|improve this answer



























            2












            2








            2







            Note that (?=^.[a-z]4$) requires a match of a 5 char string where the first one csn be any char and then there must be 4 lowercase letters. In the end, after ^ and lookaheads, there is . before $, so actually, the whole regex can match a single char string.



            You may use



            ^(?=(?:D*d)3)(?=(?:[^a-z]*[a-z])4)(?=(?:[^A-Z]*[A-Z])5)(?=(?:[^!*&#$%^]*[!*&#$%^])2).8,30$


            See the regex demo. A regulex graph:



            enter image description here



            Details




            • ^ - start of string


            • (?=(?:D*d)3) - three occurrences of any 0+ non-digits followed with a digit


            • (?=(?:[^a-z]*[a-z])4) - four occurrences of any 0+ chars other than a lowercase ASCII letters followed with a lowercase ASCII letter


            • (?=(?:[^A-Z]*[A-Z])5) - five occurrences of any 0+ chars other than an uppercase ASCII letters followed with an uppercase ASCII letter


            • (?=(?:[^!*&#$%^]*[!*&#$%^])2) - two occurrences of any 0+ chars other than some specific special chars (defined in the character class) followed with a char from the sepcified !*&#$%^ set


            • .8,30 - any 8 to 30 chars


            • $ - end of string.





            share|improve this answer















            Note that (?=^.[a-z]4$) requires a match of a 5 char string where the first one csn be any char and then there must be 4 lowercase letters. In the end, after ^ and lookaheads, there is . before $, so actually, the whole regex can match a single char string.



            You may use



            ^(?=(?:D*d)3)(?=(?:[^a-z]*[a-z])4)(?=(?:[^A-Z]*[A-Z])5)(?=(?:[^!*&#$%^]*[!*&#$%^])2).8,30$


            See the regex demo. A regulex graph:



            enter image description here



            Details




            • ^ - start of string


            • (?=(?:D*d)3) - three occurrences of any 0+ non-digits followed with a digit


            • (?=(?:[^a-z]*[a-z])4) - four occurrences of any 0+ chars other than a lowercase ASCII letters followed with a lowercase ASCII letter


            • (?=(?:[^A-Z]*[A-Z])5) - five occurrences of any 0+ chars other than an uppercase ASCII letters followed with an uppercase ASCII letter


            • (?=(?:[^!*&#$%^]*[!*&#$%^])2) - two occurrences of any 0+ chars other than some specific special chars (defined in the character class) followed with a char from the sepcified !*&#$%^ set


            • .8,30 - any 8 to 30 chars


            • $ - end of string.






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 23 at 21:35

























            answered Mar 23 at 21:30









            Wiktor StribiżewWiktor Stribiżew

            1




            1























                0














                ^(?=.14,30$)(?=(?:.*[A-Z])5)(?=(?:.*[a-z])4)(?=(?:.*d)3)(?=(?:.*[!*&#$%^])2).*$
                └─────┬─────┘└───────┬────────┘└───────┬────────┘└──────┬──────┘└─────────┬──────────┘
                │ │ │ │ │
                │ │ │ │ 2 special characters
                │ │ │ │
                │ │ │ 3 digits
                │ │ │
                │ │ 4 lowercase letters
                │ │
                │ 5 uppercase letters

                string is 14-30 characters long



                ^(?=(?:.*[A-Z])5)(?=(?:.*[a-z])4)(?=(?:.*d)3)(?=(?:.*[!*&#$%^])2).(14,30)$
                └───────┬────────┘└───────┬────────┘└──────┬──────┘└─────────┬──────────┘
                │ │ │ │
                │ │ │ 2 special characters
                │ │ │
                │ │ 3 digits
                │ │
                │ 4 lowercase letters

                5 uppercase letters





                share|improve this answer





























                  0














                  ^(?=.14,30$)(?=(?:.*[A-Z])5)(?=(?:.*[a-z])4)(?=(?:.*d)3)(?=(?:.*[!*&#$%^])2).*$
                  └─────┬─────┘└───────┬────────┘└───────┬────────┘└──────┬──────┘└─────────┬──────────┘
                  │ │ │ │ │
                  │ │ │ │ 2 special characters
                  │ │ │ │
                  │ │ │ 3 digits
                  │ │ │
                  │ │ 4 lowercase letters
                  │ │
                  │ 5 uppercase letters

                  string is 14-30 characters long



                  ^(?=(?:.*[A-Z])5)(?=(?:.*[a-z])4)(?=(?:.*d)3)(?=(?:.*[!*&#$%^])2).(14,30)$
                  └───────┬────────┘└───────┬────────┘└──────┬──────┘└─────────┬──────────┘
                  │ │ │ │
                  │ │ │ 2 special characters
                  │ │ │
                  │ │ 3 digits
                  │ │
                  │ 4 lowercase letters

                  5 uppercase letters





                  share|improve this answer



























                    0












                    0








                    0







                    ^(?=.14,30$)(?=(?:.*[A-Z])5)(?=(?:.*[a-z])4)(?=(?:.*d)3)(?=(?:.*[!*&#$%^])2).*$
                    └─────┬─────┘└───────┬────────┘└───────┬────────┘└──────┬──────┘└─────────┬──────────┘
                    │ │ │ │ │
                    │ │ │ │ 2 special characters
                    │ │ │ │
                    │ │ │ 3 digits
                    │ │ │
                    │ │ 4 lowercase letters
                    │ │
                    │ 5 uppercase letters

                    string is 14-30 characters long



                    ^(?=(?:.*[A-Z])5)(?=(?:.*[a-z])4)(?=(?:.*d)3)(?=(?:.*[!*&#$%^])2).(14,30)$
                    └───────┬────────┘└───────┬────────┘└──────┬──────┘└─────────┬──────────┘
                    │ │ │ │
                    │ │ │ 2 special characters
                    │ │ │
                    │ │ 3 digits
                    │ │
                    │ 4 lowercase letters

                    5 uppercase letters





                    share|improve this answer















                    ^(?=.14,30$)(?=(?:.*[A-Z])5)(?=(?:.*[a-z])4)(?=(?:.*d)3)(?=(?:.*[!*&#$%^])2).*$
                    └─────┬─────┘└───────┬────────┘└───────┬────────┘└──────┬──────┘└─────────┬──────────┘
                    │ │ │ │ │
                    │ │ │ │ 2 special characters
                    │ │ │ │
                    │ │ │ 3 digits
                    │ │ │
                    │ │ 4 lowercase letters
                    │ │
                    │ 5 uppercase letters

                    string is 14-30 characters long



                    ^(?=(?:.*[A-Z])5)(?=(?:.*[a-z])4)(?=(?:.*d)3)(?=(?:.*[!*&#$%^])2).(14,30)$
                    └───────┬────────┘└───────┬────────┘└──────┬──────┘└─────────┬──────────┘
                    │ │ │ │
                    │ │ │ 2 special characters
                    │ │ │
                    │ │ 3 digits
                    │ │
                    │ 4 lowercase letters

                    5 uppercase letters






                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Mar 24 at 13:01

























                    answered Mar 23 at 21:56









                    ΩmegaΩmega

                    27.7k2289159




                    27.7k2289159





















                        0














                        Instead of a regex, which may be difficult to maintain, how about some simple code that is easy to read and modify:



                        Private Function IsStringValid(s As String) As Boolean
                        If (s.Length > 30) OrElse (s.Length < 14) Then
                        Return False
                        End If

                        Dim lower, upper, digit, special As Integer
                        For Each c As Char In s
                        Select Case True
                        Case Char.IsLower(c)
                        lower += 1
                        Case Char.IsUpper(c)
                        upper += 1
                        Case Char.IsDigit(c)
                        digit += 1
                        Case Char.IsSymbol(c) OrElse Char.IsPunctuation(c)
                        special += 1
                        End Select
                        Next
                        Return (lower >= 4) AndAlso (upper >= 5) AndAlso (digit >= 3) AndAlso (special >= 2)
                        End Function


                        Based on your requirements, the minimum length has to be 14.






                        share|improve this answer





























                          0














                          Instead of a regex, which may be difficult to maintain, how about some simple code that is easy to read and modify:



                          Private Function IsStringValid(s As String) As Boolean
                          If (s.Length > 30) OrElse (s.Length < 14) Then
                          Return False
                          End If

                          Dim lower, upper, digit, special As Integer
                          For Each c As Char In s
                          Select Case True
                          Case Char.IsLower(c)
                          lower += 1
                          Case Char.IsUpper(c)
                          upper += 1
                          Case Char.IsDigit(c)
                          digit += 1
                          Case Char.IsSymbol(c) OrElse Char.IsPunctuation(c)
                          special += 1
                          End Select
                          Next
                          Return (lower >= 4) AndAlso (upper >= 5) AndAlso (digit >= 3) AndAlso (special >= 2)
                          End Function


                          Based on your requirements, the minimum length has to be 14.






                          share|improve this answer



























                            0












                            0








                            0







                            Instead of a regex, which may be difficult to maintain, how about some simple code that is easy to read and modify:



                            Private Function IsStringValid(s As String) As Boolean
                            If (s.Length > 30) OrElse (s.Length < 14) Then
                            Return False
                            End If

                            Dim lower, upper, digit, special As Integer
                            For Each c As Char In s
                            Select Case True
                            Case Char.IsLower(c)
                            lower += 1
                            Case Char.IsUpper(c)
                            upper += 1
                            Case Char.IsDigit(c)
                            digit += 1
                            Case Char.IsSymbol(c) OrElse Char.IsPunctuation(c)
                            special += 1
                            End Select
                            Next
                            Return (lower >= 4) AndAlso (upper >= 5) AndAlso (digit >= 3) AndAlso (special >= 2)
                            End Function


                            Based on your requirements, the minimum length has to be 14.






                            share|improve this answer















                            Instead of a regex, which may be difficult to maintain, how about some simple code that is easy to read and modify:



                            Private Function IsStringValid(s As String) As Boolean
                            If (s.Length > 30) OrElse (s.Length < 14) Then
                            Return False
                            End If

                            Dim lower, upper, digit, special As Integer
                            For Each c As Char In s
                            Select Case True
                            Case Char.IsLower(c)
                            lower += 1
                            Case Char.IsUpper(c)
                            upper += 1
                            Case Char.IsDigit(c)
                            digit += 1
                            Case Char.IsSymbol(c) OrElse Char.IsPunctuation(c)
                            special += 1
                            End Select
                            Next
                            Return (lower >= 4) AndAlso (upper >= 5) AndAlso (digit >= 3) AndAlso (special >= 2)
                            End Function


                            Based on your requirements, the minimum length has to be 14.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Mar 25 at 3:41









                            Cody Gray

                            197k36388478




                            197k36388478










                            answered Mar 23 at 23:44









                            MaryMary

                            4,53621021




                            4,53621021



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55318414%2fregular-expression-validation-issues%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                                SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                                은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현