【发布时间】:2022-09-23 09:41:57
【问题描述】:
如何删除 URL(包含 \"www\")但不删除包含 \"w\" 的任何其他单词?
这是我的 R 代码
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 \"
如何维护单词“w8”和“weekdays”?我只想在这种情况下删除 URL。先感谢您!