Warning: file_get_contents(/s/bach/a/class/cs253/pub/Lab/Regex/regex.cc): failed to open stream: No such file or directory in /s/bach/a/class/cs253/public_html/Spring20/pmwiki/cookbook/pub.php on line 19
CS253 | Lab / RegularExpression

CS253: Software Development with C++

Spring 2020

Regular Expression

Regular Expression Lab                

In this lab, you will gain practice using regular expressions. A skeleton source file is in ~cs253/Lab/Regex/regex.cc. Copy it to a convenient directory and modify it during this lab.                 

Template                

The file ~cs253/Lab/Regex/regex.cc contains:


Exercises                

regex.cc contains a number of calls to the function test(), which takes a regular expression, matches it against the string A quick brown fox jumps over the lazy dog, and displays the location and text of any match.                 

You will replace each placeholder regular expression "regex goes here" with a regular expression that performs the task described in the previous lines. The first exercise is already done.                 

    1: pattern="jump" target="A quick brown fox jumps over the lazy dog"
       at 18: "jump"
The 18 means that “jump” was found at offset 18 of the target string.

How to submit your work:                

Use web checkin, or Linux checkin:                 

    ~cs253/bin/checkin RECIT15 recit15.txt

How to receive negative points:                

Turn in someone else’s work.