0

I have a long list of dictionary words in notepad++ and I am looking to shorten the list by deleting all words above six character. Is there any way I can do this. I have tried using multi-line editing but clearly this doesn't work because the word are too many.

Pang
  • 9,073
  • 146
  • 84
  • 117
Patrice Andala
  • 164
  • 1
  • 13

3 Answers3

2

Use the replace window using:

  • Find what: .{6,1000} (6 to 1000 characters, or the number you want)
  • Replace with: (leave empty)
  • Search mode : Regular expression

All lines more than 6 characters will be emptied

Then you can delete empty lines:

  • Find what: \n\n
  • Replace with: \n
  • Search mode : Extended (\n \r...)
F.Igor
  • 3,872
  • 1
  • 17
  • 24
2

This one do the job:

  • Ctrl+H
  • Find what: ^.{6,}\R
  • Replace with: EMPTY
  • Replace all

Explanation:

^               : begining of line
  .{6,}         : 6 or more any character
  \R            : any kind of linebreak
Toto
  • 86,179
  • 61
  • 85
  • 118
1

You can use ctrl-h and tick regular expressions. Try finding: ^[A-Z|a-z]{6,}$ and replace with blank

enter image description here