For example:
$s1 = \"Test Test the rest of string\" $s2 = \"Test the rest of string\"
I would like to match positively $s1 but
$s1
Not working everywhere, see the comments...
^([^\b]+)\b\1\b ^(\B+)\b\1\b
Gets the first word, and matches if the same word is repeated again after a word boundary.