1. Shrink all whitespace on each line to 1 space 2. Create hash of each line 3. Find longest matching hash string (allowing x hashes to be different)