How to remove characters from the end of lines in Notepad++

Once, when generating commands for configuring the OLT, I needed to take part of the configuration of a working device and remove 2 characters from the end of each line.

As always, thanks to Notepad++, such tasks are done very quickly. Open the search with CTRL+H, select “Regular Expressions” in the Search Mode at the bottom, and enter the following in the Find field:

..$

Leave the “Replace with” field empty and click “Replace all”.

The number of dots indicates the number of characters, and $ indicates the end of the line.

See also my articles:
How to add characters to the beginning of each line
How to add characters to the end of each line
How to add a blank line after each line

Leave a comment

Leave a Reply