Added solution for c using replace-regexp
Fixed error I introduced in d. and added solution using 2 level macro