thanks for the reply ,actually i want to do the following thing::
any consecutive letters in the word should be enclosed in brackets.for eg: "thhheeee good boyy" should be "t(hhh)(eeee) g(oo)d bo(yy)" . the no of consecutive letters may differ in the word.