title: Searching the mpaa cast file for movies with an actor in them?
body: <p>Just to clarify- I am not looking for exact answers, just something to get me on the right track.  I am supposed to create a program which will input this <a href="http://introcs.cs.princeton.edu/java/45graph/cast.mpaa.txt" rel="nofollow">text file</a> and will allow a user to input an actor's name into a scanner and will return all of the movies that that actor has been in.  The only problem is that I know that if the scanner finds the actor's name, then the movie title will have to be the the previous movie- in other words if there is a title of a movie, followed by a list of actors, followed by an indent, and followed by another movie title- then the movie will have to be the first title.  I do not know how to get the scanner to go backwards once it has found the actor's name.  In other words: once the scanner finds the same name that has been inputted by the user, I don't know how to tell it to do the opposite of Scanner.next (the previous word) until it runs into a movie title.  How would I do this?</p>