1. You shouldn't have talked to her so harshly.
2. You shouldn't have eaten so much.
3. I need not have to cooked so much, there were only a few friends come.
4. He should have remembered her name.
5. We need not have bought a cake, my mother had baked one.