Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    can't search backwards in regular expression mode

    General Discussion
    4
    7
    783
    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.
    • Kara Kitai
      Kara Kitai last edited by

      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…

      PeterJones 1 Reply Last reply Reply Quote 0
      • PeterJones
        PeterJones @Kara Kitai last edited by

        @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)

        Kara Kitai 2 Replies Last reply Reply Quote 0
        • Kara Kitai
          Kara Kitai @PeterJones last edited by

          @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?

          PeterJones 1 Reply Last reply Reply Quote 0
          • Kara Kitai
            Kara Kitai @PeterJones last edited by

            @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
            • PeterJones
              PeterJones @Kara Kitai last edited by

              @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
              • gstavi
                gstavi last edited by

                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.

                Alan Kilborn 1 Reply Last reply Reply Quote 3
                • Alan Kilborn
                  Alan Kilborn @gstavi last edited by

                  @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
                  • First post
                    Last post
                  Copyright © 2014 NodeBB Forums | Contributors