Okay, the challenge is that you have to write a regex that matches half of all strings.
Some rules to clarify:
For ANY string length(>0), if I permute all strings(of that length), exactly half of them should be matched. Put more lightly, if I generate a random string of that length it should have a 50% chance of being matched. (this means that you cannot just match all even-length strings)
You may assume that strings contain only A-Z, a-z, and 0-9.
0 length strings are undefined, you can choose to either match them or not.
Shortest regex wins.
/^[\w0-4]/works, doesn't it? \$\endgroup\$