How to Scan Strings

Hey I was just wondering how one would be able to scan a string for certain words. Example: I ask the user for a long sentence, a long static string, and based on the context of the input, the program could give certain output. I'm just curious to know as to how this is done.

What you're talking about is called parsing. It's a broad practice, and how you go about it really depends on the format of the string. What kind of input are you expecting and how do you plan on using it? When you describe requirements, it's okay to assume that everything "just works", of course.