You can use str_detect() from the stringr package to return TRUE or FALSE if the pattern is matched. I stored a set of possible strings in the vector called Var.
library(stringr)
Var <- c("abcd...134", "flextime...258", "treatment...625",
"abcd", "..134", "...13")
str_detect(Var, "\\.{3}\\d{3}$")
#> [1] TRUE TRUE TRUE FALSE FALSE FALSE
Created on 2019-06-05 by the reprex package (v0.2.1)