Hello,
I've got a problem with underlined regular expression ".*srch.*\ [^brand|^dsa]"
. How can i write it correctly?
In this expression i want the condition: field campaign must contain "srch" and doesn`t contain "dsa" or "brand".
SVOD_TVOD <-
read.csv(xxxxxxxxxxxxxxxxxxxxxxxxxxx\\SVOD_TVOD.csv', sep = ";", encoding = 'UTF-8') %>%
mutate(campaign_type = case_when(
grepl(".*brand.*", campaign, ignore.case = T) ~ "brand",
grepl(".*dsa.*", campaign, ignore.case = T) ~ "dsa",
grepl(".*dynrem.*", campaign, ignore.case = T) ~ "dynrem",
grepl(".*net.*", campaign, ignore.case = T) ~ "net",
grepl(**".*srch.*\ [^brand|^dsa]"**, campaign, ignore.case = T) ~ "srch_v1",
TRUE ~ "others")) %>%
View()