ばよかった is a common expression used when someone regrets that something has not been/was not done. It is a pairing of the 接続助詞(せつぞくじょし) (conjunction particle)
ば, and the past form of the
い-Adjective,
良(い)い (remembering that conjugations of
いい use よ, and not い). This construction is often translated to ‘I wish I did (A)’, or ‘I should have done (A)’.
ばよかった is used after verbs, so requires the standard
ば conjugation, before adding
よかった.
-
サービスエリアが一(ひと)つもないじゃないか。高速(こうそく)に乗(の)る前(まえ)にトイレに行(い)けばよかった。
There aren't any service stops, are there? I wish I had gone to the bathroom before we got on the highway.
-
今日(きょう)も残業(ざんぎょう)?昨日(きのう)は早(はや)く寝(ね)ればよかった。
I have to work overtime again today? I should have gone to sleep early last night.
As
ば highlights hypothetical situations,
ばよかった literally means that ‘it would have been good if (A)’, where (A) is the thing that the speaker wishes had happened.
This grammar point is in direct contrast to
ばいい, the non-past version, which is used to express ‘it would be good if (A)’.
-
運転(うんてん)をしたくなかったら、電車(でんしゃ)で行(い)けばいい。
If you don't want to drive, it would be better if you went by train.