Dictionary.com
Thesaurus.com

learn one's lesson

Idioms  
  1. Profit from experience, especially an unhappy one. For example, From now on she'd read the instructions first; she'd learned her lesson. Also see hard way.