Dissecting an English sentence using a pattern
Solution 1:
There is an entire field looking at this question called "Computational Linguistics". Looking at any online translation tool you can see that they still have a ways to go, but there has been a lot done on parsing English.
Stanford provides a robust English parser here with the homepage here.
I recommend using an established library for your script rather than writing your own. There is no reason to reinvent the wheel, especially a wheel that contains the complications of the English language.