守候你守候我
以防万一需要挑选一系列字符:# For example, to get the date part from the stringsubstrRightRange <- function(x, m, n){substr(x, nchar(x)-m+1, nchar(x)-m+n)}value <- "REGNDATE:20170526RN" substrRightRange(value, 10, 8)[1] "20170526"