zuó​fēi​jīn​shì

to realize one's past mistakes