Suppose I have the following vector, with the names of presidents of the republic:
presidentes <- c("da Fonseca, DeodoroDeodoro da Fonseca",
"Peixoto, FlorianoFloriano Peixoto", "de Morais, PrudentePrudente de Morais",
"Sales, CamposCampos Sales")
I would like to format this vector so that you can read the name of each president directly:
"Deodoro da Fonseca" "Floriano Peixoto" "Prudente de Morais" "Campos Sales"
I imagine there is some regular expression that does this, but I can not build it.