Assignment 5
Using Regular Expressions
Submit before 11:30 PM Saturday October 23October 30

Overview

For this project, you will practice creating regular expressions and apply them to a web scraping problem of your choice.

Requirements

  1. Provide regular expressions that match the following descriptions. Be sure to test them in the regular expression tester.
    1. A credit card number (4 sets of 4 digits, each separated by a single space)
    2. A full 10 digit phone number, with or without the parentheses around the area code and optional hyphens between the sets of numbers.
    3. A zip code with the optional 4 digits following it. The hyphen is required if the optional 4 digits are provided.
    4. A vehicle identification number (VIN). See online description.
  2. Review the file that reads in a movies list from the file movies.txt. Modify the Python code to create your own interactive report. At minimum, it should include the following:
    1. Use regular expressions to pull out at least 3 elements from each movie (e.g. title, year, ranking number or abstract).
    2. Query user on a preference (e.g. recent movies, old movies, movies matching a particular genre) or a particular option for displaying (using input is fine, but you could create a GUI!)
    3. Display selection of movies according to user preferences and content extracted with regular expressions)

Deliverables

Submit two attachments:

  • A txt file (e.g. README.txt) that includes the following:
    • A summary of your accomplishments (include collaboration and process notes)
    • Your regular expressions to the first part
    • IDLE sessions showing that your interactive report works.
    • Source code.

The assignment is worth 10 points. In addition to meeting the requirements, full credit requires a neatly formatted txt file with well written content.