If only had I known it! / If only I had known it!
Solution 1:
In the US I most frequently hear "If only I had known"
; when I was home in Britain I also heard a variant construction: "Had I but known"
which I've almost never heard here in the US.