Skip to content

Instantly share code, notes, and snippets.

@William-Lake
Last active September 18, 2017 18:34
Show Gist options
  • Save William-Lake/1fd37c4aa73ffefaa041bb0bd02870e2 to your computer and use it in GitHub Desktop.
Save William-Lake/1fd37c4aa73ffefaa041bb0bd02870e2 to your computer and use it in GitHub Desktop.
How to remove duplicate lines from text data in notepad++
Source: http://webcache.googleusercontent.com/search?q=cache:https://notepad-plus-plus.org/community/topic/11466/eliminate-duplicate-rows-show-unique-rows-only
(Cached with Google in case it ever goes down.)
1) Open notepad++ and paste in data you want duplicate lines removed from.
2) Edit -> Line Operations -> Sort Lines Lexicographically Ascending
3) Ctrl + F
4) Search for: ^(.+?)\R(\1\R?)+
5) Replace with: \1\r\n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment