Given two string like the ones below, I would like to merge them to generate the following. The results makes little sense, however, both strings have 'a sentence' in common, which is what counts as the connector between the two strings:
"This is a sentence is a great thing"
s1 = "This is a sentence"
s2 = "a sentence is a great thing"
Is there a function for this in ruby?