How to delete lines less than 8 characters long in Notepad++
- Go to the Search menu, select Replace.
- In the Find field, enter the regular expression:
^.{0,7}$
Explanation of the regular expression
- ^ — start of the line.
- .{0,7} — any sequence of characters from 0 to 7 in length.
- $ — end of the line.
- Thus, the expression ^.{0,7}$ finds all lines containing from 0 to 7 characters.
Using the above instructions, you can easily delete lines containing less than 8 characters from your document.