html_tab2 <- "new country helllo AF"
html_tab3 <- "new country helllo Afghanistan"
a1 <- c("Afghanistan","Pakistan")
a2 <- c("AF","PK")
df <- data.frame(a1,a2)
df$a1 <- as.character(df$a1)
df$a2 <- as.character(df$a2)
grep(df[1,1],html_tab2 , ignore.case = FALSE)
- understandable wrong
grep(df[1,2],html_tab2 , ignore.case = FALSE)
- works
grep(df[1,1]|df[1,2],html_tab2 , ignore.case = FALSE)
- does not work
3 should work because df[1,2] works. I am not sure how to write this OR statement