Simplification, somehow an extra '.' (dot) had been added to the solution for b using replace regexp
Added c version - every line is reversed
Added missing instructions to the d exercise, as discovered by Savas