📅  最后修改于: 2022-03-11 14:52:00.697000             🧑  作者: Mango
library(purrr)
d %>%
mutate(y = str_extract_all(x, "\\b\\d{2}\\b") %>%
map_chr(toString))
# A tibble: 3 x 2
# x y
#
#1 i am 10 and she is 50 10, 50
#2 he is 32 and i am 22 32, 22
#3 he may be 70 and she may be 99 70, 99