Hello Erik van der Vlugt
You can easily simulate this functionality, by an appropriate regular expression :-))
Two possibilities :
If you want to select from cursor location till the next character, word, string or even regular expression matched, INcluded, just put the regex (?s).+?, before your search
If you want to select from cursor location till the next character, word, string or even regular expression matched, EXcluded, just put the regex (?s).+?(?=, before your search and end this regex with a closing round bracket !
If your search is case insensitive, use, at the beginning, the in-line modifier (?si)
If your search is case sensitive, use, at the beginning, the in-line modifier (?s-i)
If your search looks for a whole word, only, add the \b syntax, just after your search
So, let’s consider the contents of the N++ license.txt
Move back at the very beginning of your file ( CTRL + Origin )
Open the Find dialog ( CTRL + F )
Select the Regular expression search mode
Then, for instance :
The regex (?si).+?License would match from cursor location, till the string License, included, whatever its case ( 15 matches )
The regex (?s-i).+?(?=License) would match from cursor location, till the exact string License, excluded ( 6 matches )
The regex (?si).+?License\b would match from cursor location, till the word License, included, whatever its case ( 10 matches )
The regex (?s-i).+?(?=License\b) would match from cursor location, till the exact word License, excluded ( 5 matches )
Of course, you regex can, also, be a regular expression, itself ! For instance, the regex ?si).+?Th[eo]se would match from cursor location till the word those or these, included, whatever its case !
The (?s) modifier forces the regex engine to consider that the dot meta-character can match, absolutely, any character ( standard and EOL characters ). So the regex .+ can matches any non-null range of characters, even located on several lines.
The question mark ?, placed after the syntax .+ ensures that the shortest range, between the cursor location and your own search expression, will be selected !
The syntax (?=.....) is a positive look-ahead assertion. At cursor position, that condition must be true in order to valid the overall match, although this condition is NOT a part of the final regex to match !
For keeping this Find and Select behaviour, just close the Find dialog, with the ESC key, and go on, hitting the F3 key, for matching the other occurrences !
The very nice thing is that you just select the previous range(s), if you hit the SHIFT + F3 shortcut !