The batch file echo's expected output, along with the ouput of the program you are running. If your output is different then you might have some code refactoring to do. As soon as I get some algorithms from third parties I'll post my full algorithm. I expect an algorithm from Darren shortly ;-)
Batch file for testing your regex range generator.