For example, say I have a text file example.txt that reads: I like dogs. My favorite dog is George because he is my dog. George is a nice dog.
Now how do I extract "George" given that it is the first word that follows "My favorite dog is"?
What if there as more than one space, e.g. My favorite dog is George .....
Is there a way to reliably extract the word "George" regardless of the number of spaces between "My favorite dog is" and "George"?