Sure it's possible. Anything's possible if you just believe!
Use your AJAX to call the txt file from your server, then use the .search("some word");
method to find what you need.
This is an aweful solution though because the user will have to download the entire text file, and your client side code will have to parse the entire text to find what you're looking for.
You're much better off using PHP/MySQL.