Complex sentence: The Germans attacked twice and were repulsed but the French defensive success was costly and lacking armour and artillery, were obliged to withdraw.
Split into simpler sentences: The Germans attacked twice and were repulsed. However, the French took heavy casualties and, lacking armour and artillery, were obliged to withdraw.