〜ばよかった
I wish I had… (regret)machine translation
FormationVerb ば-form + よかった(です); negative: 〜なければよかった
〜ばよかった expresses regret about the past: "if only I had done…". Conjugate the verb into the ば-form and add よかった: もっと勉強すればよかった (I wish I had studied harder). The thing you regret is what you did NOT do.
Conversely, to regret something you went ahead and did, use the negative 〜なければよかった: あんなに食べなければよかった (I wish I hadn't eaten that much). Remember this pair of meanings: ばよかった = regret over not doing, なければよかった = regret over having done.
This pattern often comes with a sigh, ああ〜, and is frequently said to oneself; add です when you need to be polite. Don't confuse it with 〜てよかった — that is the exact opposite feeling: relief, "I'm glad I did."
Examples
学生の時、もっと勉強すればよかったです。
I wish I had studied harder when I was a student.
傘を持ってくればよかった。
I wish I had brought an umbrella.
ゆうべあんなに食べなければよかったです。
I wish I hadn't eaten so much last night.