Complex sentence: The Federals reformed and attacked, driving the 4th and 27th Virginia back, but the actions of the Stonewall Brigade gave the Confederate line time to reform and A.P Hill's troops to come up and fill the gaps from Winder's broken regiments.
Split into simpler sentences: The Federals reformed and attacked, driving the 4th and 27th Virginia back. But the actions of the Stonewall Brigade gave the Confederate line time to reform and A.P Hill's troops to come up and fill the gaps from Winder's broken regiments.