我有一堆带有标点符号的字符串,我想将它们转换为空格:
"This is a string. In addition, this is a string (with one more)."
会成为:
"This is a string In addition this is a string with one more "
我可以通过stringr
包(str_replace_all()
)手动执行此操作,一次一个标点符号(,/./!/(/)/等),但我很好奇是否有更快的方法我会假设使用正则表达式.
有什么建议么?