How to insert a character at the end of lines in Notepad++

- Open the file where you want to number the lines.
- Press Ctrl + H to open the replace dialog.
- In the replace dialog, select the Regular Expression tab.
- In the Find field, enter:
.$
$0\N
At the end of all lines, the letter N will appear. If you want to change the letter, just replace it in the code $0\N.
Second method
- In the Find field, enter:
$
,
Code example for inserting a character
// Original text: Line1 Line2 Line3 // Fields in the Replace dialog: Find: $ Replace with: , // Result: Line1, Line2, Line3,
Inserting any character at the end of lines in Notepad++ can be done using a simple regular expression in the replace dialog.