How to extract few selected words from a column and place it in another column?

I am working to extract words from a column. I want to extract words like Episode & Season from a column & place it in another column.

heres a starter example

library(dplyr)
library(stringr)
(example_data <- select(
  dplyr::starwars,
  name, height
))


(ex_d2 <- mutate(example_data,
  is_a_skywalker = str_detect(
    string = name,
    pattern = "Skywalker"
  )
) %>% arrange(desc(is_a_skywalker),
              name))
1 Like

@nirgrahamuk Thank you.