痛定思痛

Idiom

 * 1) to recall one's painful experience after the sorrow has passed, often to learn a lesson from the bitter experience