x <- c("string", "string.", "string. and other")
grepl("^[^.]*\\.?$", x)