Find Text Copied From Excel Cell
-
Hello all,
I recently updated my Notepad++ form v8.8.5 to v8.8.8 and I have noticed an strange issue with the Find function.
I have been using the Find function to search for names in multiple open documents. These names I have listed in an Excel spreadsheet. Normally I just copy the cell from the Excel and paste it into the ‘Find what:’ box and then click Find All in All Opened Documents. This has worked perfectly.
Since updating, when I do the same thing, after clicking the find all button the Search Mode changes to Extended, and now my text has ‘\r\n’ in front of it. Even if I select normal mode before searching this happens. If I type the text I want to find manually it works as it previously did.
Here is what it looks like prior to finding:

And here it is after clicking Find All in All Opened Documents:

Is there a setting I’m missing or has something changed since v8.8.5 that means I cannot copy and paste from an spreadsheet cell and search for the text in it anymore?
-
You have line-ending characters in your data.
Delete off the\r\nin your Find what data. -
I understand there are line-ending characters in my data in the second screenshot, but I didn’t put them there. They were automatically put in by Notepad++ after i tried to find the data from the first screenshot
-
@Mark-Anderson said in Find Text Copied From Excel Cell:
I understand there are line-ending characters in my data in the second screenshot, but I didn’t put them there
You didn’t knowingly put them there.
In v8.8.6, Notepad++ implemented a long-requested feature, where if you select multiple lines, it would be able to all go in the FIND WHAT box, rather than just a single-line’s worth. To do that, Notepad++ had to start honoring the newlines that were in selected text. This was a good thing for most, BUT not for situations like yours.
Specifically, now, when you select an entire line before doing FIND, if your selection includes the newline – and it usually does, especially if you use the margin-click or triple-click, as shown in the screenshots below – then the search string contains the newlines that you didn’t notice.

-> in this condition, the newline sequence is selected, though you might not notice it, and you won’t see it in the FIND WHAT at first.vs

-> in this condition, the newline sequence is NOT selected, so those characters won’t be in the FIND WHAT box.But by default, the FIND WHAT does not show the newline characters. So you cannot see that they are there. But they are, because you (unknowingly) selected the newline characters when you selected the whole line.
But, after you run the Search Mode =
Normalsearch, then since there’s newline characters, Notpead++ converts fromNormaltoExtended, and starts showing the newline sequence, as reported in the old closed-bug-report #11847. The advice that @Alan-Kilborn gave in a related recent issue a few days ago still holds for you as well.