Add characters to the end of a string using regex notepad2

For anyone still here 5 years later, and you are attempting to add something onto the end a line for a large non-code file (and don't want to use REGEX), there are helpful online converter tools like https://pinetools.com/add-text-each-line.

Helped me out a bunch for creating CSV files for a neural network I was making


Maybe something like this

  1. ctrl + H
  2. mark regular expressions option
  3. search for $ - this means "end of line"
  4. replace with \\n"

OR simpler

  1. select lines that you want to edit
  2. alt + M / same as edit->block->modify lines
  3. in append text to lines place \n"

Find: (.)$
Replace: \1\\n"

Here's a good regex tutorial.

Tags:

Regex

Notepad2