Find and Replace names in several text files
-
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!
-
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. :)
-
@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…
-