Hello,

Try

s <- c( "colone..xx.","coltwo.ft..rr.","colthree.gh..az.","colfour.DG..lm.")

sub("\\.{2,}.*$", "", s)
#[1] "colone"      "coltwo.ft"   "colthree.gh" "colfour.DG"

Às 09:00 de 28/06/19, lionel sicot via R-help escreveu:
c( "colone..xx.","coltwo.ft..rr.","colthree.gh..az.","colfour.DG..lm.")

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to