I have a file with the format:


I was trying to figure out how to remove the ! symbol at the end of each line. I tried using "Find and replace" in Notepad++ but it didn't work. Any ideas on this one?

  • 1
    gVim and regex. L(earn|ove|ive) it! :)
    – jnovack
    Apr 5, 2013 at 20:07

5 Answers 5


In Notepad++, press Ctrl-H (Replace...). In the Replace dialog box, click Extended under Search Mode. In the "Find what" box type !\r and in the "Replace with" box type \r. Then click Replace All.

To make this work for all lines in the file, you need to make sure that the last line is blank (you can remove the blank line later if you wish). Or manually edit the last line.

Depending on the file you might need to use \n instead of \r.


If you have it in every line try this:

  1. ctrl+h
  2. check regular expression and use this below expression:

  3. Let Replace with Empty

  4. Click Replace All in the right.

Find and Replace !\n with \n in Extended mode in Notepad++.


Here is a way to go:

  • Ctrl+H
  • Find what: .$
  • Replace with: EMPTY
  • Replace all


.   : 1 any character
$   : end of line

You could use ! instead of . if you want to remove only ! but not other character, or a character class if there are some different characters to remove for example [!;:]

  • Find what: !$
  • Find what: [!;:]$

DO NOT CHECK . matches newline

Result for given example:


I have a CSV file, and the following worked for me:

Find and replace !\r\n with \r\n

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .