How to remove the 1 last character on every line in Notepad++
charactersnotepadregex
In Notepad++, how do I turn this:
aliraft
into this:
aliraf
Best Answer
Here
^(.*).$
This means
^ start from the beginning of the line
(.*) get as many any characters, put in \1
. one more character
$ end of the line
Because we need "one more character", the first grab can't get everything, so is left with the whole line except one character. Then we replace with \1.
Best Answer
Here
This means
Because we need "one more character", the first grab can't get everything, so is left with the whole line except one character. Then we replace with
\1
.You could also simply replace
.$
with nothing