- Ctrl + H
- Найти что:
^(?:\S+\h+){4}\K.*$
- Заменить на:
LEAVE EMPTY
- check Обтекание
- check Регулярное выражение
- UNCHECK
. matches newline
- Заменить все
Объяснение:
^ # beginning of line
(?: # start non capture group
\S+ # 1 or more non space character
\h+ # 1 or more horizontal space
){4} # end group, must appear 4 times
\K # forget all we have seen until this position
.* # 0 or more any character but newline
$ # end of line
Результат для данного примера:
word1 word2 word3 word4
word6 word7 word8 word9
word10 word11 word12 word13
До:

После:
