substring with concat of all words accepted