How to remove the last character on every line in Notepad++?
Solution 1:
If every line is going to consist of exactly two |
characters in that format, I should think this regex find-and-replace will do it.
Find all:
^([^|]*)\|([^|]*)\|$
Replace all with:
\1=\2
Solution 2:
Notepad++ supports extended and regular expression search and replace. Using the extended search and replace you could do this in two passes.
In the first pass replace the trailing |
by searching for |\r
and replacing with \r
:
In the second pass we replace the middle |
by doing a normal search and replace.
This of course assumes that your line ends are \r\n
.
Solution 3:
You can use a regular expression at the replace dialog.
Find:
.{1}$
Replace with nothing Then just select Replace All
Full options are: