=TEXT(12040373;00000000)
And I would like to get rid of the parts "=TEXT(" and ";00000000)"
To obtain a string replacement in R, I can use the gsub function with a reg exp as follow:
sampleUvg50$GNR <- gsub(";\\d*\\)", "", gsub("=TEXT\\(", "", sampleUvg50$GNR));