r substitute string characters until first : code example Example: r substitute string characters until first : sub(".*? ", "", D$name)