Your task is to create a regular expression that matches most binary numbers with an even number of 0s and an odd number of 1s (e.g. "101100011").
The full criteria for the regex are:
- matches 90% or more of all binary numbers between
0and11111111with even number of0s and an odd number of1s, - doesn't match 90% or more of all binary numbers between
0and11111111with odd number of0s or an even number of1s, - works in most common programming languages.
Ideally, it should be short and creative.
The input string always has a length that is greater than 1, less than infinity, and only contains 1s and 0s.
I will upvote any answer that seriously attempts to match the above criteria. Once the activity around this question dies down, I'll accept the highest-voted answer that is at least only 1.333... times the length of the shortest answer.