Regex - Match half of the strings 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.
6

/^[5-Z]/


In ASCII's order, there's 0-9 then A-Z then a-z
So Half of the string begin with 5-Z, the other half doesn't.