Community
    • Login

    Regex - What once worked now does not. I think.

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 3 Posters 224 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.
    • S
      Skullmonger
      last edited by

      I’m doing a simple find and replace. I had it working, now it doesn’t work.

      Have I made a mistake? It’s so simple:

      [(A-Z)\.][(A-Z)]

      Or maybe:
      [(A-Z)(\.)][(A-Z)]

      It should find instances of any uppercase alpha character, followed by a “.”, followed by another uppercase alpha character.

      And it worked in the past!

      I do it today and it is ALSO finding any instance of two uppercase alpha characters in a row.

      What have I forgotten here?

      Thanks guys.

      1 Reply Last reply Reply Quote 0
      • S
        Skullmonger
        last edited by

        OK my time to edit a post is gone so I have to correct the above in a new post:

        I do it today and it is finding any instance of two uppercase alpha characters in a row, and any instance of a “.” followed by an uppercase alpha character.

        Instead of finding “A.B” and NOT “AB”, it is finding “AB” and “.B” and NEVER “A.B”.

        S 1 Reply Last reply Reply Quote 0
        • S
          Skullmonger @Skullmonger
          last edited by

          Wait… now if I look at my search history it gives me:
          ([A-Z].)([A-Z])

          I’m an idiot.

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

            @Skullmonger said in Regex - What once worked now does not. I think.:

            I’m an idiot.

            And since you didn’t put your regex inside backticks when posting, so that it looks like this (the formatting): see how I'm in red
            We really don’t have a lot of confidence in what you’ve said in order to be able to help you (if you still need help, which is unclear).

            1 Reply Last reply Reply Quote 1
            • Thomas 2020T
              Thomas 2020
              last edited by Thomas 2020

              Maybe that’s it?
              [A-Z]\.[A-Z]

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