Sort lines alphabetically, if they aren't already, and perform these steps:
(based on this related question: https://stackoverflow.com/q/1573361/3258851)
-
Control+F
-
Toggle "Replace mode"
-
Toggle "Use Regular Expression" (the icon with the
.*
symbol)