Regular expression error: “Invalid Regular Expression”










1















Below is the latest version of the regular expression I am using and it is throwing the error "Invalid Regular Expression."




XSD: The regular expression '^(?=.*[a-z])(?=.*[A-Z])(?=.*d)(?=.*[^da-zA-Z]).10,15$' failed to validate at location 4: This expression is not supported in the current option setting.




I'm getting this exception in my xsd file and I'm developing this xsd in message broker (IIB). Can anyone help to me how to resolve this ?










share|improve this question
























  • Not an answer to your question, but your regex appears to have some typos, and I would write it as this: ^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.[^0-9a-zA-Z]).10,15$

    – Tim Biegeleisen
    Nov 13 '18 at 11:05






  • 2





    May be your regex flavour doesn't support lookahead?

    – Toto
    Nov 13 '18 at 11:33















1















Below is the latest version of the regular expression I am using and it is throwing the error "Invalid Regular Expression."




XSD: The regular expression '^(?=.*[a-z])(?=.*[A-Z])(?=.*d)(?=.*[^da-zA-Z]).10,15$' failed to validate at location 4: This expression is not supported in the current option setting.




I'm getting this exception in my xsd file and I'm developing this xsd in message broker (IIB). Can anyone help to me how to resolve this ?










share|improve this question
























  • Not an answer to your question, but your regex appears to have some typos, and I would write it as this: ^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.[^0-9a-zA-Z]).10,15$

    – Tim Biegeleisen
    Nov 13 '18 at 11:05






  • 2





    May be your regex flavour doesn't support lookahead?

    – Toto
    Nov 13 '18 at 11:33













1












1








1








Below is the latest version of the regular expression I am using and it is throwing the error "Invalid Regular Expression."




XSD: The regular expression '^(?=.*[a-z])(?=.*[A-Z])(?=.*d)(?=.*[^da-zA-Z]).10,15$' failed to validate at location 4: This expression is not supported in the current option setting.




I'm getting this exception in my xsd file and I'm developing this xsd in message broker (IIB). Can anyone help to me how to resolve this ?










share|improve this question
















Below is the latest version of the regular expression I am using and it is throwing the error "Invalid Regular Expression."




XSD: The regular expression '^(?=.*[a-z])(?=.*[A-Z])(?=.*d)(?=.*[^da-zA-Z]).10,15$' failed to validate at location 4: This expression is not supported in the current option setting.




I'm getting this exception in my xsd file and I'm developing this xsd in message broker (IIB). Can anyone help to me how to resolve this ?







regex messagebroker






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 11:06









Paul R

176k24298457




176k24298457










asked Nov 13 '18 at 11:03









Suryam JangalaSuryam Jangala

61




61












  • Not an answer to your question, but your regex appears to have some typos, and I would write it as this: ^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.[^0-9a-zA-Z]).10,15$

    – Tim Biegeleisen
    Nov 13 '18 at 11:05






  • 2





    May be your regex flavour doesn't support lookahead?

    – Toto
    Nov 13 '18 at 11:33

















  • Not an answer to your question, but your regex appears to have some typos, and I would write it as this: ^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.[^0-9a-zA-Z]).10,15$

    – Tim Biegeleisen
    Nov 13 '18 at 11:05






  • 2





    May be your regex flavour doesn't support lookahead?

    – Toto
    Nov 13 '18 at 11:33
















Not an answer to your question, but your regex appears to have some typos, and I would write it as this: ^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.[^0-9a-zA-Z]).10,15$

– Tim Biegeleisen
Nov 13 '18 at 11:05





Not an answer to your question, but your regex appears to have some typos, and I would write it as this: ^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.[^0-9a-zA-Z]).10,15$

– Tim Biegeleisen
Nov 13 '18 at 11:05




2




2





May be your regex flavour doesn't support lookahead?

– Toto
Nov 13 '18 at 11:33





May be your regex flavour doesn't support lookahead?

– Toto
Nov 13 '18 at 11:33












2 Answers
2






active

oldest

votes


















0














Escape all = symbol:



As in change = to =






share|improve this answer























  • Why? Can you elaborate on this a little more?

    – Toto
    Nov 13 '18 at 12:41











  • Using . After (?= is not accepted it only matches string. Escape the first dot in the regular expression and see if it still displays that error.

    – Jolaosho batmat
    Nov 13 '18 at 12:56



















0














It looks like you want to see if a string contains at least a capital case character, a small case character, a digit, a special character and if the string is between 10 to 15 characters long.



Like @Toto already commented, I think you flavour does not support lookahead. You can do it without (I borrowed and enhanced the code from here) by using capture groups and test them:



^
(?> #MAIN iteration (atomic only for efficiency)
(?<upper>[A-Z]) # an uppercase letter
| # or
(?<lower>[a-z]) # a lowercase letter
| # or
(?<digit>[0-9]) # a digit
| # or
(?<special>[^(0-9|a-z|A-Z)]) # a special
| # or
. # anything else
)10,15? #REPEATED 10 to 15 times
#
#CONDITIONS:
(?(upper) # 1. There must be at least 1 uppercase
(?(lower) # 2. If (1), there must be 1 lowercase
(?(digit) # 3. If (2), there must be 1 digit
(?(special) # 4. If (3) there must be 1 special
| (?!) # Else fail
) #
| (?!) # Else fail
) #
| (?!) # Else fail
) #
| (?!) # Else fail
) $ #


You can test it here: regex101 example






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%2f53279604%2fregular-expression-error-invalid-regular-expression%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Escape all = symbol:



    As in change = to =






    share|improve this answer























    • Why? Can you elaborate on this a little more?

      – Toto
      Nov 13 '18 at 12:41











    • Using . After (?= is not accepted it only matches string. Escape the first dot in the regular expression and see if it still displays that error.

      – Jolaosho batmat
      Nov 13 '18 at 12:56
















    0














    Escape all = symbol:



    As in change = to =






    share|improve this answer























    • Why? Can you elaborate on this a little more?

      – Toto
      Nov 13 '18 at 12:41











    • Using . After (?= is not accepted it only matches string. Escape the first dot in the regular expression and see if it still displays that error.

      – Jolaosho batmat
      Nov 13 '18 at 12:56














    0












    0








    0







    Escape all = symbol:



    As in change = to =






    share|improve this answer













    Escape all = symbol:



    As in change = to =







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 13 '18 at 12:04









    Jolaosho batmatJolaosho batmat

    94




    94












    • Why? Can you elaborate on this a little more?

      – Toto
      Nov 13 '18 at 12:41











    • Using . After (?= is not accepted it only matches string. Escape the first dot in the regular expression and see if it still displays that error.

      – Jolaosho batmat
      Nov 13 '18 at 12:56


















    • Why? Can you elaborate on this a little more?

      – Toto
      Nov 13 '18 at 12:41











    • Using . After (?= is not accepted it only matches string. Escape the first dot in the regular expression and see if it still displays that error.

      – Jolaosho batmat
      Nov 13 '18 at 12:56

















    Why? Can you elaborate on this a little more?

    – Toto
    Nov 13 '18 at 12:41





    Why? Can you elaborate on this a little more?

    – Toto
    Nov 13 '18 at 12:41













    Using . After (?= is not accepted it only matches string. Escape the first dot in the regular expression and see if it still displays that error.

    – Jolaosho batmat
    Nov 13 '18 at 12:56






    Using . After (?= is not accepted it only matches string. Escape the first dot in the regular expression and see if it still displays that error.

    – Jolaosho batmat
    Nov 13 '18 at 12:56














    0














    It looks like you want to see if a string contains at least a capital case character, a small case character, a digit, a special character and if the string is between 10 to 15 characters long.



    Like @Toto already commented, I think you flavour does not support lookahead. You can do it without (I borrowed and enhanced the code from here) by using capture groups and test them:



    ^
    (?> #MAIN iteration (atomic only for efficiency)
    (?<upper>[A-Z]) # an uppercase letter
    | # or
    (?<lower>[a-z]) # a lowercase letter
    | # or
    (?<digit>[0-9]) # a digit
    | # or
    (?<special>[^(0-9|a-z|A-Z)]) # a special
    | # or
    . # anything else
    )10,15? #REPEATED 10 to 15 times
    #
    #CONDITIONS:
    (?(upper) # 1. There must be at least 1 uppercase
    (?(lower) # 2. If (1), there must be 1 lowercase
    (?(digit) # 3. If (2), there must be 1 digit
    (?(special) # 4. If (3) there must be 1 special
    | (?!) # Else fail
    ) #
    | (?!) # Else fail
    ) #
    | (?!) # Else fail
    ) #
    | (?!) # Else fail
    ) $ #


    You can test it here: regex101 example






    share|improve this answer



























      0














      It looks like you want to see if a string contains at least a capital case character, a small case character, a digit, a special character and if the string is between 10 to 15 characters long.



      Like @Toto already commented, I think you flavour does not support lookahead. You can do it without (I borrowed and enhanced the code from here) by using capture groups and test them:



      ^
      (?> #MAIN iteration (atomic only for efficiency)
      (?<upper>[A-Z]) # an uppercase letter
      | # or
      (?<lower>[a-z]) # a lowercase letter
      | # or
      (?<digit>[0-9]) # a digit
      | # or
      (?<special>[^(0-9|a-z|A-Z)]) # a special
      | # or
      . # anything else
      )10,15? #REPEATED 10 to 15 times
      #
      #CONDITIONS:
      (?(upper) # 1. There must be at least 1 uppercase
      (?(lower) # 2. If (1), there must be 1 lowercase
      (?(digit) # 3. If (2), there must be 1 digit
      (?(special) # 4. If (3) there must be 1 special
      | (?!) # Else fail
      ) #
      | (?!) # Else fail
      ) #
      | (?!) # Else fail
      ) #
      | (?!) # Else fail
      ) $ #


      You can test it here: regex101 example






      share|improve this answer

























        0












        0








        0







        It looks like you want to see if a string contains at least a capital case character, a small case character, a digit, a special character and if the string is between 10 to 15 characters long.



        Like @Toto already commented, I think you flavour does not support lookahead. You can do it without (I borrowed and enhanced the code from here) by using capture groups and test them:



        ^
        (?> #MAIN iteration (atomic only for efficiency)
        (?<upper>[A-Z]) # an uppercase letter
        | # or
        (?<lower>[a-z]) # a lowercase letter
        | # or
        (?<digit>[0-9]) # a digit
        | # or
        (?<special>[^(0-9|a-z|A-Z)]) # a special
        | # or
        . # anything else
        )10,15? #REPEATED 10 to 15 times
        #
        #CONDITIONS:
        (?(upper) # 1. There must be at least 1 uppercase
        (?(lower) # 2. If (1), there must be 1 lowercase
        (?(digit) # 3. If (2), there must be 1 digit
        (?(special) # 4. If (3) there must be 1 special
        | (?!) # Else fail
        ) #
        | (?!) # Else fail
        ) #
        | (?!) # Else fail
        ) #
        | (?!) # Else fail
        ) $ #


        You can test it here: regex101 example






        share|improve this answer













        It looks like you want to see if a string contains at least a capital case character, a small case character, a digit, a special character and if the string is between 10 to 15 characters long.



        Like @Toto already commented, I think you flavour does not support lookahead. You can do it without (I borrowed and enhanced the code from here) by using capture groups and test them:



        ^
        (?> #MAIN iteration (atomic only for efficiency)
        (?<upper>[A-Z]) # an uppercase letter
        | # or
        (?<lower>[a-z]) # a lowercase letter
        | # or
        (?<digit>[0-9]) # a digit
        | # or
        (?<special>[^(0-9|a-z|A-Z)]) # a special
        | # or
        . # anything else
        )10,15? #REPEATED 10 to 15 times
        #
        #CONDITIONS:
        (?(upper) # 1. There must be at least 1 uppercase
        (?(lower) # 2. If (1), there must be 1 lowercase
        (?(digit) # 3. If (2), there must be 1 digit
        (?(special) # 4. If (3) there must be 1 special
        | (?!) # Else fail
        ) #
        | (?!) # Else fail
        ) #
        | (?!) # Else fail
        ) #
        | (?!) # Else fail
        ) $ #


        You can test it here: regex101 example







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 13 '18 at 12:19









        AutomatedChaosAutomatedChaos

        5,7331740




        5,7331740



























            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%2f53279604%2fregular-expression-error-invalid-regular-expression%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







            這個網誌中的熱門文章

            How to read a connectionString WITH PROVIDER in .NET Core?

            In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

            Museum of Modern and Contemporary Art of Trento and Rovereto