PDF геморный формат одно только редактирование чего стоит
$man comm
With no options, produce three-column output. Column one contains
lines unique to FILE1, column two contains lines unique to FILE2, and
column three contains lines common to both files.
-1 suppress column 1 (lines unique to FILE1)
-2 suppress column 2 (lines unique to FILE2)
-3 suppress column 3 (lines that appear in both files)
/i.*p.*h.*o.*n.*e/
- если такой нет, то это ваша ошибка, а если есть - это, при условии нежадной регулярки, и есть самое компактное расположение символов.
Сам по себе он не заведется.