How can I remove the URL (that contains "www") but not any other word that contains "w"?
This is my R code
textz <- "Please don't w8 notification from Www.example.com, just call the office during weekdays"
# URL without https
text <- gsub("(W|w|W|w)(.)(\\S*)", "", textz)
text
# output
[1] "Please don't notification from just call the office during "
How can I maintain the word "w8" and "weekdays"? I just want to remove the URL in this context. Thank you in advance!