×

注意!页面内容来自https://www.tenforums.com/tutorials/114308-find-replace-text-notepad-windows-10-a.html,本站不储存任何内容,为了更好的阅读体验进行在线解析,若有广告出现,请及时反馈。若您觉得侵犯了您的利益,请通知我们进行删除,然后访问 原网页

' Windows 10 Help Forums

Find and Replace Text in Notepad in Windows 10

Thread: Find and Replace Text in Notepad in Windows 10

  1. Brink said:

    Find and Replace Text in Notepad in Windows 10

    How to Find and Replace Text in Notepad in Windows 10


    Notepad is a simple text editor included in Windows and a basic text-editing program which enables computer users to create documents.

    You can search to find text in Notepadand search to find and replace text in Notepad.

    Starting with Windows 10 build 17713Microsoft made significant improvements to the find/replace experience in Notepad. Microsoft added the option to do wrap-around find/replace to the find dialog and Notepad will now remember previously entered values and the state of checkboxes and automatically populate them the next time you open the find dialog. Additionallywhen you have text selected and open the find dialog it will automatically populate the search field with the selected text.

    This tutorial will show you how to find and replace text within a document in Notepad in Windows 10.


    Contents







    OPTION ONE

    To Find Text in Notepad


    1 While in Notepadperform one of the following actions you want to search and find text: (see screenshots below)

    • Press the Ctrl + F keys.
    • Select (highlight) text you want to search and findand press the Ctrl+F keys.
    • Click/tap on Edit on the menu barand click/tap on Find.

    2 Type what you want to find in the Find what field if it doesn't already have what you want.

    3 Check or uncheck the Match case box for what you want.

    4 Check or uncheck the Wrap around box for what you want.

    Wrap around is only available starting with Windows 10 build 17713.


    5 Select (dot) Up or Down for the Direction where the cursor is at within the text you want to find from.

    6 When you are ready to starting finding the text entered in step 2perform one of the following actions you want:

    • Click/tap on the Find Next button.
    • Press the F3 key. If the Find dialog is currently openthen you will need to click/tap on the Find Next button at least once first.
    • Click/tap on Edit on the menu barand click/tap on Find Next. This option will not work if the Find dialog is currently open.

    7 Repeat step 6 to find all instances of the text entered in step 2and/or click/tap on OK when it cannot find any other instances.

    Find and Replace Text in Notepad in Windows 10-notepad_find.jpg Find and Replace Text in Notepad in Windows 10-notepad_find-2.png






    OPTION TWO

    To Replace Text in Notepad


    1 While in Notepadperform one of the following actions you want to search and find text to replace: (see screenshots below)

    • Press the Ctrl + H keys.
    • Select (highlight) text you want to search and findand press the Ctrl + H keys.
    • Click/tap on Edit on the menu barand click/tap on Replace.

    2 Type what you want to find in the Find what field if it doesn't already have what you want.

    3 Type what you want to replace text with from step 2 in the Replace with field.

    4 Check or uncheck the Match case box for what you want.

    5 Check or uncheck the Wrap around box for what you want.

    Wrap around is only available starting with Windows 10 build 17713.


    6 When you are ready to start to find text entered in step 2perform one of the following actions you want:

    • Click/tap on the Find Next button.
    • Press the F3 key. If the Replace dialog is currently openthen you will need to click/tap on the Find Next button at least once first.

    7 If you want to replace this specific text found with text entered in step 3click/tap on the Replace button.

    You can click/tap on the Replace All button instead if you want to go ahead and automatically replace all found text from step 2 with text entered in step 3.


    8 Repeat step 6 and step 7 to find and replace all instances of text you wantand/or click/tap on OK when it cannot find any other instances.

    Find and Replace Text in Notepad in Windows 10-notepad_replace.jpg Find and Replace Text in Notepad in Windows 10-notepad_find-2.png


    That's it,
    Shawn Brink



    Last edited by Brink; 12 May 2021 at 09:34.
  2. Jeff S said:

    Hello Shawn -

    New member here

    I read this post for the first time today

    For a year or more now I have noticed that when I go to "Find" in Notepadit annoyingly will sometimes be on Direction "Up" instead of "Down" and in that whole year I have never gotten used to having to check that when my searches are not returning the expected results. I always figured that something had changed in Microsoft to make it start doing thatbut I never could find where. Your post provides the first answer I've ever had for that. It's a "Feature" now. Ohhow I hate new "features" sometimes . . .

    I used Find in Notepad for over 10 yearswhere it is always "Down" and if I WANT "Up" I know where to go to get it!

    I have learned that I can delete registry keys and make it revert back to defaultand I may have even found the key to edit to make it be "Down" on the next use.

    But I fear that because of this new "feature" functionalitythat as soon as I finish a Find in the "up" directionit's going to remember that and default back to "up" the next timedefeating the purpose of making the registry setting.

    Can you share any wisdom with me?

    Thank you for ANYTHING you can tell me!
  3. Brink said:

    Quote Originally Posted by Jeff S View Post
    Hello Shawn -

    New member here

    I read this post for the first time today

    For a year or more now I have noticed that when I go to "Find" in Notepadit annoyingly will sometimes be on Direction "Up" instead of "Down" and in that whole year I have never gotten used to having to check that when my searches are not returning the expected results. I always figured that something had changed in Microsoft to make it start doing thatbut I never could find where. Your post provides the first answer I've ever had for that. It's a "Feature" now. Ohhow I hate new "features" sometimes . . .

    I used Find in Notepad for over 10 yearswhere it is always "Down" and if I WANT "Up" I know where to go to get it!

    I have learned that I can delete registry keys and make it revert back to defaultand I may have even found the key to edit to make it be "Down" on the next use.

    But I fear that because of this new "feature" functionalitythat as soon as I finish a Find in the "up" directionit's going to remember that and default back to "up" the next timedefeating the purpose of making the registry setting.

    Can you share any wisdom with me?

    Thank you for ANYTHING you can tell me!
    Hello Jeffand welcome to Ten Forums.

    I'm not aware of a way to force "Up" or "Down" by default.
  4. Berton said:

    Current choices for Find in Notepad:
    Find and Replace Text in Notepad in Windows 10-image.png
  5. Jeff S said:

    Quote Originally Posted by Brink View Post
    Hello Jeffand welcome to Ten Forums.

    I'm not aware of a way to force "Up" or "Down" by default.
    Crap.

    And I'm betting that if there were a wayyou would know it!

    Thank you Shawn for writing me back
  6. Bree said:

    One problem occurs when you want to find or 'replace with' the Tab charactersomething you may want to do to change a tab separated variable (.tsv) file into a comma separated variable (.csv) one (or vice versa). You cannot type a Tab into either of the boxes.

    Finding tabs is easyyou just select a tab before searching. Whatever you have selected is automatically entered in the 'Find what' box.....

    Find and Replace Text in Notepad in Windows 10-notepad-find-tab.png

    Replacing with a tab can be more of a problem. The solution is to type a tab in Notepadselect and cut itthen paste it into the 'replace with' box.

    Find and Replace Text in Notepad in Windows 10-notepad-replace-tab.png
  7. Try3 said:

    Quote Originally Posted by Jeff S View Post
    For a year or more now I have noticed that when I go to "Find" in Notepadit annoyingly will sometimes be on Direction "Up" instead of "Down" .. I always figured that something had changed in Microsoft to make it start doing thatbut I never could find where. … But I fear that because of this new "feature" functionalitythat as soon as I finish a Find in the "up" directionit's going to remember that and default back to "up" the next timedefeating the purpose of making the registry setting.
    I have only ever seen Notepad start with Find/Replace set to Up if I had set it that way the last time I used it.

    Searching Down remains its default behaviour i.e. its behaviour unless it gets changed manually by the user.

    The "to edit to make it be "Down" on the next use" is
    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Notepad
    Value
    Name fReverse
    Data 0 [by defaultFind Down]
    Data 1 [Find Up]
    - This Registry key is rewritten every time Notepad closes so whatever state Find was in at last use will always be written to the Registry.
    - The Value fReverse is created the first time Find is set to Up manually. Before thatit does not exist.

    Denis
  8. Try3 said:

    Quote Originally Posted by Bree View Post
    One problem occurs when you want to find or 'replace with' the Tab character ...
    What an excellent little trick.

    Thanks
    Denis
  9. Jeff S said:

    Quote Originally Posted by Try3 View Post
    I have only ever seen Notepad start with Find/Replace set to Up if I had set it that way the last time I used it.

    Searching Down remains its default behaviour i.e. its behaviour unless it gets changed manually by the user.
    Correct. And whenever I did a Find that I used Up on the last Findthen the next time I open the Find it is defaulting to Up. In other wordsit is defaulting to Up if that was how I last used it.

    THAT is what's driving me NUTS!

    When go to do a Find I expect it to be in the Down position each time I open itand breaks my train of thought when it doens't behave like I expectand I have to stop what I'm doing and go reset it to Down. if I need Up I know where to get it! This comes from having used it that way for many many years (I said over 10 yearsit's probably been over 20 years). I hate the changeand not being given a choice!


    Quote Originally Posted by Try3 View Post
    The "to edit to make it be "Down" on the next use" is
    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Notepad
    Value
    Name fReverse
    Data 0 [by defaultFind Down]
    Data 1 [Find Up]
    - This Registry key is rewritten every time Notepad closes so whatever state Find was in at last use will always be written to the Registry.
    - The Value fReverse is created the first time Find is set to Up manually. Before thatit does not exist.

    Denis
    Thank you for giving me the correct key and settings. I suspectedbut did not know for sureand I appreciate your help there.

    Two things:

    #1if I set the key that waybut then the next time I do a Find if it was in the Up directionwon't it re-write (or re-set) the registry key? Do you know a way to make that key be read-onlyso it can't be changed?

    #2if I do NOT close Notepadbut the last Find I did was Upthen the next time I open Find it is defaulting to Up even though I have not closed the Notepad. Is there any way I can make it stop doing that?

    My wife insists that this is an unimportant issueand that all of the world will just adjust their workflow to use it the new way. But it's like Chinese water torture to me. I use Find in a very large Notepad file all day every dayand while I have had to get used to this extra step in my thought processit STILL bugs the be-jeebers out of me EVERY TIME I have to do it . . . .

    Thank you again for acknowleding me and taking time to help me with this.
  10. Try3 said:

    Jeff,

    #1 Yes. No.
    #2 No.

    I know Notepad in Windows XP & in Windows 10 Version 1709 always started with Find set to Down every time you used Find even during the same Notepad session & even if you had set it to Up the last time you used it.
    - I don't know when the change in behaviour took place.
    - You can extract the Notepad.exe from one of your old [Ver 1709 or earlier] system images and use that in your current version if the thing matters to you that much.


    By the wayI do not understand why you are doing so much work in Notepad. It is very limited in capability. Even the other built-in component [WordPad at "%ProgramFiles%\Windows NT\Accessories\wordpad.exe"] is more capable than Notepad and even the free versions of other word processors are.

    Denis
    Last edited by Try3; 16 May 2021 at 09:16.