Search fails
-
Pasting from clipboard when searhing, the search fails, but if I write the same search item, the search succeed. Why?
Thanks in advance!
-
You would have to give an example (specific text), but in general not everything pastes well into the Find what box.
For example, line-endings do not paste into this box, so if you have multiline data in the clipboard when you paste you will only get the first line.
This may not be what is going wrong for you, but unless you provide more information no one can help further.
-
I have a big music database file in txt mode. When I see artist’s name in internet and copy the name to clipboard to search if I already have that artist in my database, the search could occasionally fail, but if I write it, the search could probably succeed.
-
music database
That really adds no helpful information for us to provide any more help to you. We are open to helping if something more is provided.
-
Hello, @hatsa-tsaa, @alan-kilborn and All,
I agree, Alan, that if you select a multi-lines text, then copy it in the clipboard, with
Ctrl + C
and finally paste it, withCtrl + V
, in theFind what:
box, only the first line of your text is written, in that input box !However ( and luckily ! ), if you just select a multi-lines text, then open the
Find
dialog, it does write this multi-lines text, inside theFind what:
box, assuming that :-
The total amount of text is between
1
and2046
chars long -
The option
Settings > Preferences... > MISC > Don't fill find field dialog with selected word
is not ticked
So, @hatsa-tsaa, you may use this method :
-
First paste the artist’s name in your current database file, opened in Notepad++
-
Select, again, this artist’s name
-
Hit the
Ctrl + F
shortcut, whatever the state of theFind
dialog ( open or closed ) -
Finally, click on the
Find Next
button
=> You should get matches, if your database contains this artist’s name, of course !
Best Regards,
guy038
-
-
I was just giving a “for example” when I cited multiple line data. We don’t know that this is the case for the OP.
-
@guy038 said in Search fails:
guy038
Thanks guy038!
Your method doesn’t work either.
I don’t mean multiline text.
Is there also some kind of html or css code in clipboard, when copying from web site and pasting it to input box? Because, when I write the search term, I get matches.Thanks!
-
There is html code. When I copied phrase “Jimi Hendrix” from a web page and then I pasted it with Paste HTML content to Notepad++, I got this:
Version:0.9
StartHTML:00000173
EndHTML:00000329
StartFragment:00000207
EndFragment:00000293
SourceURL:moz-extension://13d61562-b74f-4d46-9793-e72234da2bf4/reader.html
<html><body>
<!–StartFragment–><h1 class=“post-title”>Jimi Hendrix </h1><!–EndFragment–>
</body>
</html>That’s why I didn’t get matches.
-
Hello, @hatsa-tsaa, @alan_kilborn and All,
Of course, from your example, below, copied in a new N++ tab :
Version:0.9 StartHTML:00000173 EndHTML:00000329 StartFragment:00000207 EndFragment:00000293 SourceURL:moz-extension://13d61562-b74f-4d46-9793-e72234da2bf4/reader.html <html><body> <!–StartFragment–><h1 class="post-title">Jimi Hendrix </h1><!–EndFragment–> </body> </html>
This following regex S/R :
SEARCH
(?s-i)Version:.+"post-title">(.+?)\h*<.+</html>
REPLACE
\1\r\n
would change all this multi-lines text into the artist’s name, only :
Jimi Hendrix
However, does your browser have a plain-text reading mode that displays plain text ? I suppose that selecting the artist’s name would give you just the string Jimi Hendrix !
Best Regards,
guy038
-
@guy038 said in Search fails:
plain-text reading
Thanks guy038!
I use mainly Firefox. Probably there’s addon to do the trick.
-
Hello, @hatsa-tsaa, @alan_kilborn and All,
I always use an old Firefox version for Win XP :
Firefox ESR v52.9.0 ( 32 bits )
Here is main page of the Le Monde newspaper, in normal mode :
And here is the same page in Plain-text reading mode :
The tooltip “Passer en mode lecture” means
"Switch to reading mode"
and “Quitter le mode lecture” means"Exit Reading mode"
!Best Regards,
guy038
-
Thanks guy038 for the tip!