This question comes from CodeStepByStep RegEx Exercise 5, and I have been banging my head against a wall for the past hour and a half trying to figure it out. I am by no means capable at writing regular expressions, and so the idea of checking for number of occurrences confuses me. The first three problems in the exercise were easy enough, though I can't see how the last is possible.
Write a regular expression that will match the following pattern: Binary strings containing at least one 1 and at most two 0's