can't search backwards in regular expression mode
-
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…
-
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)
-
@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 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
-
@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
-
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:- “ALL” options should be grayed out when “backward” checkbox is selected.
- “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.
-
@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.