How to delete the last 5 characters in each line in Notepad++
- Open the file from which you want to delete the last 5 characters in each line. To do this, click File and select Open.
- Go to the Search menu and select Replace... or press Ctrl + H.
- In the Find what field, enter the following regular expression:
(.{5})$ - Leave the Replace with field empty.
- Make sure the Regular expression checkbox is checked.
- Click the Replace All button to delete the last 5 characters in all lines of the file.
Checking the result
- Check the file to make sure the last 5 characters of each line have been deleted.
- Save the file by clicking File and selecting Save or press Ctrl + S.
Now you know how to delete the last 5 characters in each line in Notepad++ using regular expressions.