I have a text file and I want to display all words that contains both z and x characters.
How can I do that ?
Sounds like a job for Regular Expressions. Read that and try it out. If you run into problems, update your question and we can help you with the specifics.