目に遭って

go through; experience (something unpleasant)

→ 目
phrase Rare #37,776
go through; experience (something unpleasant) Used when describing an unpleasant, dangerous, or unfortunate experience. Often follows a phrase such as ひどい目に (a terrible experience) or 危険な目に (a dangerous experience).
JA: 水車小屋で痛い目に遭って学んだよ。
EN: I learned my lesson after going through a painful experience at the watermill.

彼はいろいろと不幸な目に遭っている。

He has experienced a lot of misfortune.

水車小屋で痛い目に遭って学んだよ。

I learned that the hard way at the watermill.

私も危険な目に遭っている。

I’m in danger too.

またこんな目に遭って…

Going through this again…

— フィフス・エレメント (1997)

痛い目に遭ってそれを知った海賊は、何人いたことか。

How many pirates learned that the hard way?