logo CodeStepByStep logo

regex5

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

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

Binary strings starting and ending with a 0
Binary strings with the start character being different than the end character
Binary strings containing an even (possibly zero) number of 0's
Binary strings containing at least one 1 and at most two 0's

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.