Okay, finally this mistery is solved thanks to
this post.
When you invoke
java Quetico "\B" "^23 *$76 bc" on bash, the
string "
^23 *$76 bc" is actually translated into the string "
^23 *6 bc" before it is passed to the program.
$7 is taken to be a variable without a value assigned to it. And the program produces the expected output
0 2 4 8 (and thus B is the correct answer if you are using a unix/linux computer). On a Windows machine you have to execute the following statement on the command line
java Quetico "\B" "^23 *6 bc" to get the same output.
So the appropriate fix would be to get rid of
$7 in each of the possible answers. If you do, you'll get the following results: