Question: Note: The below regular expressions should utilize metacharacters, character classes, grouping, alternation, and quantifiers where applicable. Also, when creating your regular expressions, please use the

Note: The below regular expressions should utilize metacharacters, character classes, grouping, alternation, and quantifiers where applicable. Also, when creating your regular expressions, please use the notation from the lectures: /regular expression/

1. Write a regular expression that matches your name

2. Write a regular expression that matches the words Then and Than (use a character class)

3. Write a regular expression that matches the sequence yes or the sequence no

4. Write a regular expression that matches at least one d followed by any number of f's.

5. Write a regular expression that matches the structure of a social security number

6. Write a regular expression that matches all names that begin with a Mc (case sensitive)

7. Write a regular expression that will match all C++ files (files/names that end in a .c or .cc., dont worry about cpp)

8. Write a regular expression that matches words that contain a sequence of vowels (aeiou) (e.g. jjjakkkollllu, akkkku, jallekkillllu)

9. Write a regular expression that matches words that begin and end with the letter b (e.g bob, bulb, etc)

10. For the below regular expression, give two examples that match the expression and two examples that do not match. Your examples that match and do not match the expression must include the characters x and y. The entire character set is x and y.

/x+y+/

11. For the below regular expression, give two examples that match the expression and two examples that do not match.

/[a-f]z?/

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!