substring with concat of words