How to add a word to the end of all lines in Notepad++
- Open Notepad++.
- Click File in the top menu and select Open... to open the desired file.
- Press Ctrl + H to open the Find and Replace window.
- In the Find field, enter the following regular expression:
(.*)
\1 your_word
\1 stands for the content of the found line, and your_word is the word you want to add to the end of each line. Replace your_word with the word you need.Example
Consider an example where we want to add the word "example" to the end of each line. In this case, the Find what field will contain (.*), and the Replace with field will contain \1 example.
Input: Hello World This is a test Output: Hello example World example This is a test example
Using Notepad++ and its regular expression capabilities, you can add any word to the end of all lines in your file.