str_detect: Detect patterns in texts, using fixed("") for "(, ), *, ', $, +"

PHOTO EMBED

Wed Jun 01 2022 06:00:20 GMT+0000 (Coordinated Universal Time)

Saved by @Treenose #r

#library(stringr)

df %>%     ##### if detecting regular characters #####
  filter(str_detect(colum1, "patern1" | str_detect(column1, "patern2")))


df %>%    ##### if detecting special characters #####
  filter(str_detect(colum1, fixed("(")) | str_detect(column1, fixed(")")))
content_copyCOPY