How i search the text in my dynamic text box

Hi,

How i search the text in my dynamic text box.

Suppose I give one value in input text box. That search and select that word in the dynamic text box. How is it possible. Give me any solutions.

so i attached one jpg like this image.

Like this selection the text.

I guess this might just be the thing you may be looking for
http://blog.greensock.com/textmetrics/