The boy regretted having spent so much time playing when he________.
【正确答案】 A
【答案解析】解析:本句用的是虚拟语气:should/could/might/…+have+done。这句话的意思是:“这个男孩在本该学习的时候都去玩耍了,现在他后悔了。”因此正确答案为A。