参见英文答案 >
Remove all punctuation except apostrophes in R4个
我试图从除撇号之外的字符串中删除所有标点符号.这是我的exastr2< -
原文链接:https://www.f2er.com/regex/357248.html我试图从除撇号之外的字符串中删除所有标点符号.这是我的exastr2< -
str2 <- "this doesn't not have an apostrophe,.!@#$%^&*()" gsub("[[:punct:,^\\']]"," ",str2 ) # [1] "this doesn't not have an apostrophe,.!@#$%^&*()"
我究竟做错了什么?