Community
    • 登入

    can't search backwards in regular expression mode

    已排程 已置頂 已鎖定 已移動 General Discussion
    7 貼文 4 Posters 2.9k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Kara KitaiK
      Kara Kitai
      最後由 編輯

      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…

      PeterJonesP 1 條回覆 最後回覆 回覆 引用 0
      • PeterJonesP
        PeterJones @Kara Kitai
        最後由 編輯

        @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 KitaiK 2 條回覆 最後回覆 回覆 引用 0
        • Kara KitaiK
          Kara Kitai @PeterJones
          最後由 編輯

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

          PeterJonesP 1 條回覆 最後回覆 回覆 引用 0
          • Kara KitaiK
            Kara Kitai @PeterJones
            最後由 編輯

            @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 條回覆 最後回覆 回覆 引用 0
            • PeterJonesP
              PeterJones @Kara Kitai
              最後由 編輯

              @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 條回覆 最後回覆 回覆 引用 0
              • gstaviG
                gstavi
                最後由 編輯

                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 KilbornA 1 條回覆 最後回覆 回覆 引用 3
                • Alan KilbornA
                  Alan Kilborn @gstavi
                  最後由 編輯

                  @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 條回覆 最後回覆 回覆 引用 2
                  • 第一個貼文
                    最後的貼文
                  The Community of users of the Notepad++ text editor.
                  Powered by NodeBB | Contributors