Assignment: regex problems
Due Friday Sep. 13, 10 am
Overview
Read the regular expression section of the bash shell tutorial and provide regular expression syntax to match the strings in the following scenarios. Any reasonable syntax si fine, and even better, challenge yourself to figure out multiple ways to answer each question.
This is an assignment, graded credit/no credit, and it does not need to follow the requirements for problem set submissions. Any format is fine (including hand-written and scanned).
Problems
- Match the strings “dog”, “Dog”, “dOg”, “doG”, “DOg”, etc. (The word ‘dog’ in any combination of lower and upper case.)
- Match the strings “cat”, “caat”, “caaat”, etc.
- Match the strings “cat”, “at”, and “t”.
- Match two words separated by any amount of whitespace.