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.
要是我当初学习更努力一些,我就能通过考试了。