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,564
  • 146
  • 81
  • 122
Patrice Andala
  • 184
  • 1
  • 14

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
  • 4,119
  • 1
  • 18
  • 26
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
  • 89,455
  • 62
  • 89
  • 125
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