fixbug: match word when the last char of the word match