Postgresql Substring Between Two Strings Are Anagrams