To make the dough: place the flour, yeast, sugar, salt, eggs and milk in the bowl of a stand mixer, mix on a low speed until it all comes together then turn up to medium speed and mix for a couple of minutes until the dough is smooth and slightly elastic. The dough is quite sticky so if you are kneading by hand be prepared to get messy!
With the mixer running, add the butter in lumps one at a time then continue to knead the dough at a high speed until the butter is all evenly incorporated and the dough is smooth, soft and elastic. It will still be quite sticky but should start to pull away from the sides of the bowl cleanly.
Fold over the ends, then fold the cut strips of dough over the filling, alternating sides so that it looks like it has been braided.
Loosely cover the dough with oiled cling film and leave it to rise until it is puffy and springs back slowly when you press it gently with a finger – about 1 hour. Meanwhile, preheat the oven to 180°C/350°F/gas mark 4.
Gently brush the dough with the beaten egg and sprinkle with demarera sugar. Bake for 30-40 minutes until golden and cooked through. Because of the large amounts of butter and sugar in the dough, brioche can colour very quickly on the outside before being cooked on the inside, so if it starts to darken too quickly, cover it with a piece of tin foil.
Leave the brioche to cool on the tray for 10 minutes then carefully transfer it to a wire rack. Best eaten the day it is made but will keep for a couple of days in an airtight container.