How to find a word that match of condition in a sentences

Try this:

But in my opinion it could be easier for you if you used different approach like using object groups and object variables.