More Regular Expressions  
 
 

Week 4

Readings:

  • Read Chapter 8 - Matching
  • Read Chapter 9 - Text Processing

Key Concepts:

  • Matching
  • Option modifiers
  • Anchors
  • Match variables
  • General quantifiers
  • Substitutions
  • Split and join
  • Nongreedy Quantifiers

Exercises:

    From the book:
  • Chapter 8: #1-3 and 5-6
  • Chapter 9
Write a program to read in a given file specified on the command line, add each unique word to a hash and count each occurrence (after converting it to lower case). Then print all the words and the number of times they appear, sorted alphabetically in a formatted list using printf.


Files to Be Downloaded