Search and Replace Failed



  • Search and replace fails to find the target text even though windows search shows many instances of the target text. Same response for the fnr utility. What is wrong?



  • @Ward-Hill

    without providing additional information I only can assume that you did something wrong as find function is working for me.

    Cheers
    Claudia



  • If you suspect that Notepad++'s Find feature is broken because it doesn’t work for you, please don’t post here and say “find is broken” without providing any details. Why are details needed when the Find feature is so obviously broken? [Clearly anyone should be able to see how busted this is without me wasting time providing details…] Well, it is very likely that it is YOU that is broken, and not Notepad++!

    Here is something to try when you are sure that Notepad++'s Find is broken:

    Set the Find window controls the following way, pay close attention now… :

    Imgur

    Put your desired search text in the Find what zone.

    Verify that your search text actually occurs in the currently active editor document tab (VERY IMPORTANT!)

    Press the Find Next button in the Find window.

    It is extremely likely that Notepad++ has found your text and jumped the current caret location to it, and even highlighted it with a selection! Amazing, isn’t it? In the rare event that Notepad++ did not find your text, then feel free to post here and provide details so others can attempt to reproduce the failure.

    Otherwise, you now have to ask yourself, “Why was I so sure that Notepad++'s Find was busted?” Well, actually reading the text of the controls on the Find window might help. Let’s see…was I…

    • …expecting to find text that only occurs below the current caret position, but yet I had the Backward direction checkbox checked, and the Wrap around checkbox unchecked?
    • …expecting to find text that only occurs above the current caret position, but yet I had the Backward direction checkbox unchecked, and the Wrap around checkbox unchecked?
    • …searching for “the” and expecting it to match “THE” and I had the Match case checkbox checked?
    • …searching for “test” and expecting it to match “testing” or “stoutest” and I had the Match whole word only checkbox checked?
    • …searching in Extended or Regular expression search mode without knowing what that really means?


  • Sorry, I never meant to imply the program failed, only that I must have done something wrong. I am a first time user trying to find and replace some sensitive language in many files on each of several personal computers in a DoD environment. Files include Word, PowerPoint and Excel. Using the Windows search box results in identifying these files OK, but of course, does not support find and replacing the text. Using Notepad++, I did the following:

    Search, Find in files, “TextOld” in the “Find what” field, “TextNew” in the “Replace with” field, no filters, browse to the appropriate directory and insert in the “Directory” field, check in the “Match whole word only” box, no check in the “Match case” box, “Normal” search mode, no “Extended” button, No “Regular expression” button, check in “In all sub-folders”, no check in “Follow current doc.”, No check in “In hidden folders”, check in "Transparency_On losing focus (default?). Then click “Replace in Files”, and OK to replace all occurrences.

    Report shows no occurrences found. ???



  • @Ward-Hill

    You are trying to replace text in WORD, EXCEL and POWERPOINT documents using Notepad++? That’s not going to work. The format of those files is not text!



  • @Ward-Hill said:

    never meant to imply the program failed

    No worries. This has become somewhat of a FAQ: “Notepad++ Find doesn’t work, why?”–with no details. It gets kind of old. When it comes up again I’ll just link to my post above. :)

    I could sift through your more detailed scenario and try to establish what is going wrong for you, but really @Jim-Dailey has it right–you shouldn’t be using Notepad++ on these files anyway.



  • I finally came to the same conclusion. MS Office must use different encoding than text for their file format. Sorry for the bother, but I still have the problem. Any suggestions would be appreciated. Thanks, all.



  • @Ward-Hill

    How about this?

    I assume word and excel share something similar.

    Cheers
    Claudia



  • @Claudia-Frank
    Thanks Claudia. This one looks very friendly. See also “Global Office Find and Replace” Powerful, but pricy.



  • Yeah I got an obvious problem with search and replace not working for me, just search for a double quote " and try replacing it with a single one, using the find next yealds the error that no matches were found despite there being tons of them there to change. Interestingly the error returned “”" could not be found, is this because the source code uses a double quote to encase the string that theyre using? I thing so anyways, tried the escape code didnt work.

    After further dubugging a simple and obvious fault with search I discover the doublequote used in my utf 8 document is not the same one that I get from my keyboard my fault for using the paste command and expecting it would deal with any 8,16bit differences textual accounting? Solution copy the element your trying to the clipboard so you don’t use the one provided on your EN-US keyboard.

    ANyways had my rant sorry i’m so pissed about it, i’m pissed I have to do it at all, xampp php mysql should all function well with both double quotes or single quotes according to the specification…





  • @Matthew-Carven

    So I guess the question becomes, where did the double-quote characters in your document originate from? I don’t think it is from Notepad++ itself. At least when I try typing double-quote characters into a UTF-8 document and then searching for them I have no problems whether I type the double quotes into the Find box or if I cut and paste the double quotes from the document into the Find box.



  • @Scott-Sumner They originated from a paste from pdf what is more puzzling is that notepad++ accepted the characters in a utf8 encoded document check the status bar it says utf8.

    So the problem is with paste/encoding not search. Here is an example that sets it off for me.
    <p>Hello World!</p>
    <?php
    $age = 15;
    $name = “Harry”;
    ?>
    <p>Hello World again!</p>
    <?php
    echo $name;
    ?>



  • Took me more than 3 mins of editing time to do a screeshot, only edit within 3 mins? Why is sombody gonna tag up the place while you arn’t looking?

    Anyway its established, I whinge a lot.
    Also my last post was 15 mins ago, 5 mins more than the 1200 second timer. See here
    Is this because I tried to edit my post? I was denied the edit due to the 3 min limit.

    [link text](@Scott-Sumner They originated from a paste from pdf what is more puzzling is that notepad++ accepted the characters in a utf8 encoded document check the status bar it says utf8.

    So the problem is with paste/encoding not search. Here is an example that sets it off for me.
    <p>Hello World!</p>
    <?php
    $age = 15;
    $name = “Harry”;
    ?>
    <p>Hello World again!</p>
    <?php
    echo $name;
    ?>

    Screenshot



  • So I guess you’ve discovered that with Unicode there are a few different versions of double-quote characters. Other than this I don’t know what to tell you. I don’t see any problem with any aspect of Notepad++ in relation to this. Feel free to whine on but there really isn’t anything to be done.

    The time limits on the web site are set the way they are because there are people in the world that like to attempt to ruin things for others with spam. The time limits are an attempt to mitigate that.



  • Okay i’ll point out that this is a utf8 document and there was an element clearly not in the 0-255 byte range here so obviously a fault within notepad++. We found dark matter hidden in the sandy soils of our beaches but there was nothing concerning about it?

    Just funished unstalling the 64bit ver so i could get plugin manager as apparently 64bit doesn’t install on 7.5.1.

    Now have to uninstall the 32bitver for same reason dropping a few versions back from the mainline now.

    i KNOW unicode has multiple quote characters and ones that look like the real thing aswell but what i want to know is how i was able to store somthing larger than a byte within a byte or doesn’t it actually do 8 bit text?



  • @Matthew-Carven

    I think you have some confusion about how encoding works. All the byte values in your file are within the 0-255 range. It is the concept of “encoding” that interprets the sequencing of bytes present in different ways. It is too lengthy/complicated/off-topic to go into in-depth here; suggest asking Google some pointed Unicode/encoding questions to increase your understanding…however, there is no Notepad++ “dark matter” here. That’s all I’ve got to say, maybe someone else will take up the discussion if you feel the need to keep it going.



  • Shouldn’t Plugin Manager be a core feature? I wish it were its the only reason I hav’'n’t completely abandoned notepad++ as a poor mans text editor but proper support for utf8 is really killing it for me, lets hope there are some good code indentation and order plugins to redeem it with.

    What I put a single quote everywhere i skipped a letter its legit isn’t it?

    Will i put up a video of me using the convert to utf8 function then pasting in the faulty html alongwith running the replace that failed because the core program is using 16 bits and not fucking 8 to store the fucking file.



  • Sorry if i’m a little pissed but if the file was utf8 it wouldn’t allow me to be able to insert 16bit data ie unicode please now do some research of your own on unicode. 0-65535 I just want a 8 byte text editor.

    Do you want a good product? I do. Do you think it should be standards compliant? I do, I have walked away from this app in the past but now that windows 7 notepad is unicode i’m left to look to the black arts to summon a utf 8 text editor.

    Why is all web dev done on a 386 running a linux text editor?

    Again with the post time limits and posting amount limits, I may be new here but what I say still has meaning and value, if only to highlight what should be done next to fix your failing text editor. ITS BEEN 10 MINUTES ALREADY SEE THE “posted 11 minutes ago” text? yet another screenshot Made me wait 20 mins again can we raise a ticket because clearly utf 8 standards have been violated here, if it doesn’t do it, stop saying it does, and remove the menu items for it please or its false advertising.



  • I can already see what the crap solution will be for the problem, change the status of the utf8 to utf16 when utf16 is pasted into a ut8 document and make the user convert the document to 8bit everytime they paste somthing in. INSTEAD OF USING 8BITS to store 8BITS, what we have now is 16 bits clearly.

    I don’t know why i havn’t just given up on your product maybe its because its been around for such a long time, its free. But maybe its just time for me to head back out on teh webs and download me another text editor? so long as it can deal with utf8 i think I could be a step up from where I currently am. Its a poor mans text editor if it lets you insert 16 bit data into what should only fit 8.

    Again with the post limits its making me wait 20 mins not 10. Another screenshot I have a legitimate problem with notepad++ cannot accurately display which utf i’m using, if i paste utf16 into a utf 8 document that utf 8 document now has utf 16 within while still notifying the user that its utf8.

    How hard is it to fix your installer for plugin manager, i’ll do it for ya if you like.


Log in to reply