used to express a wish that something was different or that something had happened differently
If only I had studied harder, I would have passed the exam.
要是我當初學習更努力一些,我就能通過考試了。