I'm trying to remove all punctuation from a string except apostrophes. Here's my exastr2 <-
str2 <- "this doesn't not have an apostrophe,.!@#$%^&*()"
gsub("[[:punct:,^\\']]"," ", str2 )
# [1] "this doesn't not have an apostrophe,.!@#$%^&*()"
What am I doing wrong?