Introduction to Regular Expressions  
 
 

Week 3

Readings:

  • Read Chapter 6 - Hashes
  • Read Chapter 7 - Beginning Regular Expressions

Key Concepts:

  • Hashes
  • Metacharacters
  • Simple quantifiers
  • Character classes

Exercises:

    From the book:
  • Chapter 6
  • Chapter 7
Write a program to read in a string from the command line followed by any number of given files, then print any lines in each file that contain the initial string. This is much like the unix grep command. The output should contain the file name, line number, and line that contains the given string for each match.


Files to Be Downloaded