113

Regular Expressions
Pattern Matching Exercise EXTRA

  • Using only the knowledge that you have gained in the course to this point, try the following exercise:


    Exercise
    1. Run the example "pat4" as follows: pat4 < pat.dat
    2. Copy the example "pat4" into a new script called "pat5".
    3. "Accumulate" a complete name-addr1-addr2 tuple and print each as a tab-delimited line
      • Hint1: Combine the last three "pat" examples.
      • Hint2: Store name, addr1, and addr2 until all 3 are not empty.

    Start

    Solution