This phrase shows you are unhappy. It means something did not go as planned. You feel a good chance was lost.
、。
It would have been fine if you had just kept quiet, but you had to say something unnecessary.
に、で。
He could have passed the exam if he had just tried a little harder, but apparently he gave up halfway through.
、…。
If only you had called, I would have gone to the station to pick you up...
、。
If you hadn't done anything you wouldn't have gotten hurt, but it's because you moved clumsily.
、。
Even though the weather was so lovely, I ended up just lazing around at home all day.