Highlighting/changing text color in a Textbox as user types

Highlighting/changing text color in a Textbox as user types

Hi, 

I have a text box.
I need to
1) search the database for the words user is typing in the text box. This will happen with each key press.
2) if there is a match - I need to change the text color.

How can I achieve this?
Thanks so much.