sub string with concatenation of all words