When you have a block of text and you want to find the shortest substring with one of two matches on either end, in either order.