Notepad++ / Adding a character at the beginning or end of each line

STEP 1. Press CTRL-H to bring up the Find/Replace Dialog.

STEP 2. Choose the “Regular expressions” checkbox near the bottom of the dialog.

STEP 3.a To add “test” to the beginning of each line, type `^` in the “Find what” field, and “test” in the “Replace with” field. Then hit “Replace All”.

STEP 3.b To add “test” to the end of each line, type `$` in the “Find what” field, and “test” in the “Replace with” field. Then hit “Replace All”.

Loading

How to add a character on each line in Notepad++

Follow these steps:

  1. Press Ctrl+H to bring up the Find/Replace Dialog.
  2. Choose the Regular expression option near the bottom of the dialog.

To add a word, such as test, at the beginning of each line:

  1. Type ^ in the Find what textbox
  2. Type test in the Replace with textbox
  3. Place cursor in the first line of the file to ensure all lines are affected
  4. Click Replace All button

To add a word, such as test, at the end of each line:

  1. Type $ in the Find what textbox
  2. Type test in the Replace with textbox
  3. Place cursor in the first line of the file to ensure all lines are affected
  4. Click Replace All button

Loading