learn one’s lesson

(fig.) naučiti (svoju) lekciju, izvući pouku

(To suffer a bad experience and know not to do it again)

I got very drunk once and was really sick. I won’t do it again, I learnt my lesson.