Page 1 of 1

Weeding out word shorter than five characters

Posted: Wed Jan 13, 2010 9:28 am
by Leif
I have a list of 100,000 words. I want to delete all words that are 1 to 4 characters long. How do I do this? I've tried different sortings but so far to no avail.

Posted: Wed Jan 13, 2010 11:04 am
by ben_josephs
That is not clear.

Do you mean you have a file containing words of alphabetic characters, one per line, with no white space, and you want to delete every line containing a word less than five characters long? If so, this will do what you want:
Find what: ^[a-z]{1,4}\n
Replace with: [nothing]

[X] Regular expression

Replace All
This assumes you are using Posix regular expression syntax:
Configure | Preferences | Editor

[X] Use POSIX regular expression syntax

Posted: Wed Jan 13, 2010 11:20 am
by Leif
Thank you very much! Just what I needed! Worked like a dream.