Remove character "|" at the end of each line in Notepad++

I have a notepad++ file like this.|NULL|NULL|NULL||NULL|NULL|NULL|

I'm trying to remove the | symbol at the end of the line. I would want my file in this way.|NULL|NULL|NULL|NULL|NULL|NULL

I have a file with 20,000 records. Can someone please help me with the solution?
Em kayAsked:
Who is Participating?
Bill PrewCommented:
You can use a regular expression to just remove trailing vertical bars from the end of lines as below.  Note that we search for \|$.  The $ is the regular expression indicator for end of line.  And we have to 'escape' the | since it is a special character in the regex syntax, so to represent a | we have to use \|.


NorieVBA ExpertCommented:
Is this a text file or an Excel workbook?
Em kayAuthor Commented:
it is a text file.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Christopher RourkeProduct Manager @ Experts ExchangeCommented:
Notepad++ offers a special highlighting feature, if you hold down "Alt" you can highlight only from the line position up & down.

notepad alt highlighting
Or you could use a find and replace:

find and replace
Em kayAuthor Commented:
Thank you Chris.
Christopher RourkeProduct Manager @ Experts ExchangeCommented:
Happy to help Em Kay :)
Christopher RourkeProduct Manager @ Experts ExchangeCommented:
And if my comment answered your question please be sure to select it as the solution to close the question. That way others can easily find this solution too.
Em kayAuthor Commented:
Thank you all for the solutions.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.