I can't find out short vim style solution for this. That's why here is the vim script.
function! s:escape(line)
return escape(a:line, '[]*')
endfunction
function! s:highlight_similar(pattern, extraction)
let sorted = sort(getline(1, '$'))
let matched_lines = {}
let pattern = '^\s*\(\w\+\)\s\+\(\w\+\).*$'
let previous_part = ''
let previous_line = ''
for i in range(0, line('$') - 1)
let line = sorted[i]
if line !~ a:pattern
continue
endif
let part = substitute(line, a:pattern, a:extraction, '')
if empty(part)
continue
endif
if part == previous_part
let matched_lines[s:escape(line)] = i
let matched_lines[s:escape(previous_line)] = i
else
let previous_part = part
let previous_line = line
endif
endfor
let @/ = join(keys(matched_lines), '\|')
endfunction
And commands definition that should be in the same file
command! -nargs=0 HighlightTwoWords
\call <SID>highlight_similar('^\s*\(\w\+\)\s\+\(\w\+\).*$', '\1 \2')
command! -nargs=0 HighlightTwoRows
\call <SID>highlight_similar('^\s*\(.*\)\s*$', '\1')
And then after using 'HighlightTwoWords' command you will be able to use 'n' and 'N' to move through lines you are interested in. Or by using 'hls[earch]' command you can highlight those lines.