Community
    • Login

    Why [A-Z] = [a-z]?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 3 Posters 324 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Bahaa0013B
      Bahaa0013
      last edited by Bahaa0013

      I’m trying to replace uppercase characters with “?u”
      Lowercase with “?l”, And Numbers with “?d”…
      But there is a problem, When I try to replace [A-Z] characters it detect everything as uppercase and replace all of the charecters as"?u", and when I search [a-z] it also detect every character as lowercase and replace them as “?l”

      example:

      N4eHbZ+HsytYV+dzi3y7UAv3YRqAd5oPJzXnL6QK2d3EvkVu2N1R+BeniJmkY0Z0GGySmDeoVSTxZ7xfJEG5OMDSYEXsOKTOsKT
      

      output for “([A-Z]) & and replace with “?u””

      ?u4?u?u?u?u+?u?u?u?u?u?u+?u?u?u3?u7?u?u?u3?u?u?u?u?u5?u?u?u?u?u?u?u6?u?u2?u3?u?u?u?u?u2?u1?u+?u?u?u?u?u?u?u?u0?u0?u?u?u?u?u?u?u?u?u?u?u?u?u7?u?u?u?u?u5?u?u?u?u?u?u?u?u?u?u?u?u?u?u?u
      

      aslo the same output for lowecase ([a-z]):

      ?l4?l?l?l?l+?l?l?l?l?l?l+?l?l?l3?l7?l?l?l3?l?l?l?l?l5?l?l?l?l?l?l?l6?l?l2?l3?l?l?l?l?l2?l1?l+?l?l?l?l?l?l?l?l0?l0?l?l?l?l?l?l?l?l?l?l?l?l?l7?l?l?l?l?l5?l?l?l?l?l?l?l?l?l?l?l?l?l?l?l
      

      So I want to replace uppercase with “?u”, lowercase with “?l” and numbers with “?d” in the previous example.

      the expected output should looks like this:
      “?u?d?l?u?l?u+?u?l?l?l?u?u+?l?l …etc”

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Bahaa0013
        last edited by Alan Kilborn

        @Bahaa-Eddin-ツ

        When I try to replace [A-Z] characters it detect everything as uppercase

        First problem:
        Match-case checkbox?

        replace with “?u””

        Second problem:
        ?u is not a valid replace expression.
        Have you RTFM?

        Bahaa0013B 2 Replies Last reply Reply Quote 1
        • Bahaa0013B
          Bahaa0013 @Alan Kilborn
          last edited by

          @Alan-Kilborn
          yes you are right thanks it work now… I will feel stupid for about 2 months after this 💀

          Lycan ThropeL 1 Reply Last reply Reply Quote 1
          • Bahaa0013B
            Bahaa0013 @Alan Kilborn
            last edited by

            @Alan-Kilborn
            No, I’m just copying token string of my site, just testing the security level…
            Some sites has 1 type of strings that accepted in their system… So if a hacker know how string looks like, He can generate more strings and brute force the website… So this is a danger, I’m fixing it… That’s it

            Alan KilbornA 1 Reply Last reply Reply Quote 1
            • Alan KilbornA
              Alan Kilborn @Bahaa0013
              last edited by

              @Bahaa-Eddin-ツ

              Oh, I see. You just want to replace with a literal ?u. Most questions of this ilk have the poster wanting to convert the case of the matched text.

              1 Reply Last reply Reply Quote 1
              • Lycan ThropeL
                Lycan Thrope @Bahaa0013
                last edited by

                @Bahaa-Eddin-ツ ,
                Nah. You’ll hardly even remember it once it sinks to the bottom of the new posting queue. :)

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors