IT 117: Intermediate to Scripting
Answers to Class 13 Ungraded Quiz

  1. Write the regular expression that is equivalent to * on the Unix command line.
    .*
  2. Write a regular expression that will match one or more whitespace characters.
    \s+
  3. Write a regular expression that can be used to find all lines in a file that contain "GET" somewhere in the line.
    .*GET
  4. Write a regular expression that will match one of the octets in an IPv4 address.
    \d{1,3}
  5. Write a regular expression that will match an IPv4 address.
    \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}