In the 19th century lancers and sword cavalry existed side by side. I've never heard of swords being replaced by lances.I thought most cavalry by WW1 had gone to lances.
Checking my sources on Omdurman I see that I should not have mentioned that battle as evidence of swords since that charge was made by the 21st Lancers.
However, here's a reference to a new model British cavalry sword in 1908, the model used in WW1, so even at that late date the British Army was not getting rid of its cavalry swords and was in fact still acquiring new swords.
Pattern 1908 cavalry sword