Right, so this one’s just a natural way of saying:
👉 If I'd known...
No need to dig around for complex grammar rules, just whip this chunk out and you’ll sound 100% legit.
💡It’s often followed by hubiera + past participle OR que + verb in imperfect.
🌪️ When to whip it out
Whenever you regret not knowing something earlier:
De haber sabido, ni hubiera venido.
If I’d known, I wouldn’t even have come.
De haber sabido que venías, hubiera preparado algo de comer.
If I’d known you were coming, I would’ve made some food.