• Login
Community
  • Login

Find and Replace names in several text files

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 3 Posters 1.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    Samuel Geremias
    last edited by Mar 15, 2022, 12:21 PM

    Re: Find and Replace Iteration…

    Dear colleagues,

    I have a file with two names separated by space, while each pair is in a different line.

    NameA NameB
    NameC NameD
    …

    I also have several files in the formarmat .tre, .nex and they all can be open on note pad ++ and showed as text.

    What I want to do is replace the nameA for NameB, C for D and so on. In all files opened on notepad ++.

    The names to be replaced on the other files may be inside a phrase with complex symbols like:

    102.222;NameA%LLLNameC@#%

    If I do it manually it works. I use ctrl H, fill the form with replace NameA for NameB and click on replace in all open documents.

    However, I would have to do it too many times, so I want to do it automatically. I’ve reading the forum, but I have no experience coding.

    Can someone please write a little command to be used on the replace tool from notepad ++ to solve this problem? I believe it is possible.

    Thank you!

    A 1 Reply Last reply Mar 16, 2022, 11:35 AM Reply Quote 0
    • L
      Lycan Thrope
      last edited by Lycan Thrope Mar 15, 2022, 11:10 PM Mar 15, 2022, 11:09 PM

      Not one of the coding geniuses here, but it seems it would be a good time to learn the forum and regex, since you are a first time poster. You can start by reading this thread to learn to format your request post here at this link: Formatting in the Forum so the folks here will be able to see exactly what you need changed, and what you want it to look like.

      Also, since you are a new poster, check the online manual to learn about regex, and good site to learn how to do that is here: regex101.com , to interactively test the results and also to learn more about what the regex highlights. You can use the Notepad++ search and replace functionality, or the mark, but I find that playing in this sandbox keeps me from accidentally messing something up. Good luck, learn this stuff for yourself, it’s been a fun and valuable experience for me, after the frustration subsides. :)

      1 Reply Last reply Reply Quote 0
      • A
        Alan Kilborn @Samuel Geremias
        last edited by Mar 16, 2022, 11:35 AM

        @samuel-geremias said in Find and Replace names in several text files:

        but I have no experience coding.
        Can someone please write a little command to be used on the replace tool from notepad ++ to solve this problem? I believe it is possible.

        Most anything is possible with “coding”. :-)

        Yes, this is a task that you aren’t going to get anywhere on without some coding.

        Perhaps this OTHER RECENT THREAD has some starter information for this task…

        1 Reply Last reply Reply Quote 2
        • A Alan Kilborn referenced this topic on Oct 24, 2022, 2:00 PM
        1 out of 3
        • First post
          1/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors