idiom
to learn the hard way
aprender a base de errores o experiencias difíciles
Meaning
to learn by making mistakes or through difficult experiences
Example
He **learned the hard way** that honesty is the best policy.
Él **aprendió de la manera difícil** que la honestidad es la mejor política.