Search code examples
regexduplicatesnotepad++

How to delete all words after certain word (duplicates)? (example inside)


I have a long list looks like this. Is it possible to delete everything on each line after the word "Icon" including "Icon" as well, preferably. Or can I delete "Icon" later its easy, when other things will be deleted. By Notepad++ if possible.

Acceleration Icon Acceleration
Adamant Recovery Icon Adamant Recovery
Admonisher Icon Admonisher
Adrenaline Rush Icon Adrenaline Rush
Advanced Munitions Icon Advanced Munitions
Adverse Growth Icon Adverse Growth
Afterimage Icon Afterimage
Aftershocks Icon Aftershocks
Aggravation Icon Aggravation

Solution

  • Icon.*$

    Use that in a Replace with the Regular Expression mode enable, and then Replace All.