[R] Regular expressions and 2 dots

lionel sicot pt|t_b|eu @end|ng |rom y@hoo@|r
Fri Jun 28 10:00:40 CEST 2019


Hello,
I have files from an equipment with column names including dots.I would like to simplify these names but all my attempts with sub and regular expressions are unsuccessful.
I havec( "colone..xx.","coltwo.ft..rr.","colthree.gh..az.","colfour.DG..lm.")and I would like to have c( "colone","coltwo.ft","colthree.gh","colfour.DG")

that means to delete everything after the two dots but to keep strings after intermediate dot like in colfour.DG
Thanks in advance for your help (a working solution would be good, explainations with the working solution would be ideal).Nice day,Ptit Bleu.
	[[alternative HTML version deleted]]



More information about the R-help mailing list