Is it possible to delete repeated words in a text file using Notepad ++?
Is it possible to delete repeated words in a text file using Notepad ++?
If your Notepad ++ is with the Plugin TextFX (newer versions usually come with it. Alternatively you can easily add it using Plugin manager ), and the words are on separate lines, you can do it this way:
Select the desired text (or + to to select everything), and sort the words with these two options:
Sort ascending
and
Sort outputs only UNIQUE (sort only UNIQUE / single outputs)
When both options are selected, click one of the two options just above:
Sort lines case sensitive (if you want to differentiate between uppercase and lowercase)
OR
Sort lines case insensitive (if it is to eliminate repeated ones independently of casing ).
Source:# >
Just do not forget to turn off UNIQUE after doing this, if you use TextFX to sort something else;)
There is the tool to find and also substitute words that can somehow do that.
By clicking Control + F , it opens a window with several options:
Find | Replace | Find in Files | Mark
By clicking tab Replace
, you can add the word you want to find and what you want to replace, if it is by another word or leave it blank if you want it to be removed. You can replace one or all of the words in the current document, or all open documents / tabs in Notepad ++ as you can see in the buttons on the right side.
Update
Inoticedthatleavingthe"Replace with" option blank, it will replace with a blank as the end result. To solve this problem, just make a new replacement, but this time in "Find what" we will put 2 spaces and in "Replace with" we will only place a space to fix this problem.