It would be nice to catch exceptions rather than just crash as this program does when something is wrong with the regular expression or the file does not open.
You have reached the End of the Chapter.
Here is a list of topics which you may wish to search through.