How do I have to modify the regex below to have all true except the last one (taxi)? Can't figure out what's wrong. Many thanks.
library(stringr) txt <- c("New York", "Hello New York, how are you", "New Yorker coffe", "New Yorker taxi") str_detect(txt, regex("New York[a-z]*?\\b(?!taxi)")) #>  TRUE TRUE TRUE TRUE
Created on 2020-11-30 by the reprex package (v0.3.0)