-
[6] Use the test program to make and test a pattern that matches any
string containing fred. Does it match if your
string is Fred, frederick, or
Alfred?
-
[6] Use the test program to make and test a pattern that matches any
string containing at least one a followed by any
number of b's. Remember that "any
number" might be zero. Does it match if your string is
barney, fred,
abba, or dinosaur?
-
[5] Use the test program to make and test a pattern that matches any
string containing any number of backslashes followed by any number of
asterisks. Does it match if your string is \\**,
fred, barney \\\***, or
*wilma\? (Note the typography; those are four
separate test strings.)
-
[6] Write a new program (not the test program)
that prints out any input line that mentions
wilma. (Any other lines should simply be skipped.)
For extra credit, allow it to match Wilma with a
capital W as well.
-
[8] Extra credit exercise: write a program that prints out any input
line that mentions both wilma
and fred.