Remove Duplicate Lines in Notepad++

If you’ve ever had the need to remove the duplicate lines from a long list of entries like so…

hi
bye
hi
guy
bye
hi

… and are looking for this…

hi
bye
guy

You can use the find/replace feature in Notepad++ to do it if you use the regex funcationality. Here’s the find string…

^(.*?)$\s+?^(?=.*^\1$)

Just replace with a zero length string.

If you’d like to read up on the details I found this tip here

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Leave a Reply