x <- "24.3483 stuff stuff 34.8325 some more stuff" stringr::str_extract_all(x, "\\b[0-9]{2}\\.[0-9]{4}.*?(?=\\b[0-9]{2}\\.[0-9]{4}|$)")