logo CodeStepByStep logo

regex7

Language/Type: General regular expressions
Author: Melissa Hovik (on 2018/06/01)

Write a regular expression that will match each of the following patterns:

Strings that contain the words "coffee", "mocha", or "green tea" containing no digits or special characters (space characters should be accepted). Your pattern should ignore letter-casing.
Strings that contain "cat" or "dog" but not both (ignoring letter-casing)

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.