posted 14 years ago
will you need to dynamically generated the output based on user supplied regex input? or will it ALWAYS be a-zA-Z?
Basically, you need to determine what the range of values is. a-z is 26 values, and then A-Z is another 26. That means you need to generate a number from 1-52. you then need to map your numbers to your output values.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors