Green’s Dictionary of Slang

my hat! excl.

also in my hat!

a general excl.

[UK]Kipling ‘Slaves of the Lamp — Part I’ in Complete Stalky & Co. (1987) 58: ‘My hat! said he, throwing himself upon the banquet. ‘Who stumped up for this, Stalky?’.
[UK]Sporting Times 1 Apr. 11/2: Said No. 2: ‘My hat! this is a really nice girl.’ Said No. 1: ‘She is a nice girl, old chap, but that was my foot.’.
[UK]‘Sapper’ Mufti 268: My hat! [...] Can this thing be true? Giving up leave.
[UK]E. Raymond Tell England (1965) 117: ‘My hat!’ exclaimed White.
[UK]E. Raymond Child of Norman’s End (1967) 69: Sunday School kids! [...] My hat!
[UK]G. Blake Shipbuilders (1954) 163: ‘My hat, Danny!’ he cried.
[UK]J.B. Priestly Three Men in New Suits 75: My hat, they would, would they?
[UK]‘Frank Richards’ Billy Bunter at Butlins 40: Oh, my hat!
[UK]‘John le Carré’ Honourable Schoolboy 254: My hat! F-ing and blinding like I don’t know what.
[Aus]R.G. Barrett Godson 119: ‘[M]y hat. Some of them look old enough to be your aunty’.
[UK]R. Dahl Rhyme Stew (1990) 39: A brazen wench cried, ‘Oh my hat!’.
[Ire]D. Healy Bend for Home 86: We’re on holidays, said Matt Donnelly. You are in my hat. Do you think I’m a gom?
[UK]Times 22 May 🌐 He did not swear. ‘Gracious!’ and ‘my hat!’ did duty as his most violent expletives.

In exclamations