Complex sentence: The battalion served in 23 Infantry Brigade for a few months at the beginning of the war and rejoined it in October 1941 and remained with it until mid- 1945 when it joined 29 Infantry Brigade.
Split into simpler sentences: The battalion served in the 23rd Infantry Brigade for a few months at the beginning of the war. Rejoining in October 1941, it remained with the brigade until mid- 1945, when it joined the 29th Infantry Brigade.