• Login
Community
  • Login

can't search backwards in regular expression mode

Scheduled Pinned Locked Moved General Discussion
7 Posts 4 Posters 2.6k 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.
  • K
    Kara Kitai
    last edited by Jan 31, 2021, 12:19 AM

    If I choose to search in regular expression mode, both 2 find buttons and shift + enter to search with backwards order does not take effect. the backward arrow button is greyed out and shift + enter key is just ignored. ( in normal mode, everything works fine)

    beats me…

    P 1 Reply Last reply Jan 31, 2021, 12:31 AM Reply Quote 0
    • P
      PeterJones @Kara Kitai
      last edited by Jan 31, 2021, 12:31 AM

      @Kara-Kitai

      Have you checked the documentation?

      The online user manual , accessible from the ?-menu inside Notepad++, has a section on advanced preferences , which explains where you can enable backwards regex search (and why it was disabled by default)

      K 2 Replies Last reply Jan 31, 2021, 1:07 AM Reply Quote 0
      • K
        Kara Kitai @PeterJones
        last edited by Jan 31, 2021, 1:07 AM

        @PeterJones thanks for the direction. but I still dont get what harm allowing backward search in regex would do me as is quoted in this statement “Backward regex searching is foribidden by default (starting in v7.8.7) due to sometimes surprising results.”

        any repercussion?

        P 1 Reply Last reply Jan 31, 2021, 1:33 AM Reply Quote 0
        • K
          Kara Kitai @PeterJones
          last edited by Jan 31, 2021, 1:30 AM

          @PeterJones to add to it, the whole settings of program reverts back to default when I change regexBackward4PowerUser value to yes. and backward search still doesn’t work the way it’s supposed to work

          1 Reply Last reply Reply Quote 0
          • P
            PeterJones @Kara Kitai
            last edited by Jan 31, 2021, 1:33 AM

            @Kara-Kitai said in can't search backwards in regular expression mode:

            any repercussion?

            Data gets completely messed up in a way you didn’t expect, but that you didn’t notice before saving and exiting.

            Or complaining in this forum or the issues page that Notepad++ is broken because of those unexpected results

            1 Reply Last reply Reply Quote 0
            • G
              gstavi
              last edited by Jan 31, 2021, 9:59 AM

              I guess the sometimes surprising results mainly apply to the Find ALL and Replace ALL options rather than the Find.
              There is absolutely no sense in Finding ALL with backward search.
              From UI perspective either:

              1. “ALL” options should be grayed out when “backward” checkbox is selected.
              2. “ALL” options should do forward search regardless of “backward” checkbox since the user can’t tell the difference.

              I realize that backward search (shift-F3) is technically challenging for regular expressions but since the vast majority of users use rather small files, an implementation that searches forward from beginning of file and stop at the last result before the cursor will make most users happy.

              A 1 Reply Last reply Jan 31, 2021, 1:47 PM Reply Quote 3
              • A
                Alan Kilborn @gstavi
                last edited by Jan 31, 2021, 1:47 PM

                @gstavi said:

                I guess the sometimes surprising results mainly apply to the Find ALL and Replace ALL options rather than the Find.

                From my understanding it is the opposite of what you said.
                The “all” operations always move only forward through the text when doing their work, again AFAIK.
                Even “Replace All” with “backward” direction (in non regex search modes) moves forward when it does the replacement! You just don’t see how it is doing it because it does it all at once.

                Ah, when you said:

                since the user can’t tell the difference.

                you were considering this!

                There is absolutely no sense in Finding ALL with backward search.

                Seems true…

                “ALL” options should be grayed out when “backward” checkbox is selected.

                That gives the higher power to the checkbox rather than the buttons. I think the devs wanted it the other way. Just a guess.
                Good UI/UX design is really hard.

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