SD 212 Spring 2024 / Homeworks


hw09: Regex intro

  • Due before the beginning of class on Friday, January 26

Nothing to submit for this homework. Just get it done!

  1. Choose info challenge teams.

    See the email from Dr. Roche sent out Thursday afternoon. Pick your team (of 3–4 within the same section), fill in the spreadsheet, and then submit the form.

  2. Watch a youtube video about regular expressions

    Here’s the link: https://www.youtube.com/watch?v=7DG3kCDx53c

    The video is just 11 minutes long. We will spend the next week or so in class learning details of regex and how to use them in bash and python.

  3. Check your comprehension

    What does \d mean in a regular expression?

    1. A duplicate character
    2. The delete key
    3. Any digit 0-9
    4. A decimal number
Click to show the answer
  1. Any digit 0-9
  1. Check your comprehension

    What does .* mean in a regular expression?

    1. Any file extension
    2. Any punctuation character
    3. Any sequence of characters
    4. Syntax error
Click to show the answer
  1. Any sequence of characters