• Login
Community
  • Login

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

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 3 Posters 277 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 Aug 1, 2020, 12:10 AM

    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 Aug 1, 2020, 12:15 AM

      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 Aug 1, 2020, 12:17 AM Reply Quote 0
      • S
        Skullmonger @Skullmonger
        last edited by Aug 1, 2020, 12:17 AM

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

        I’m an idiot.

        A 1 Reply Last reply Aug 1, 2020, 1:46 AM Reply Quote 1
        • A
          Alan Kilborn @Skullmonger
          last edited by Aug 1, 2020, 1:46 AM

          @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
          • T
            Thomas 2020
            last edited by Thomas 2020 Aug 1, 2020, 5:50 AM Aug 1, 2020, 5:50 AM

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

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