Skip to content
Prev 201233 / 398503 Next

Removing "+" and "?" signs

On Nov 22, 2009, at 6:01 PM, Steven Kang wrote:

            
Since both ? and + are special regex characters, to do both the  
substitutions at once you need to use double backslashes and an <or>

 > gsub("\\?|\\+", " ", x)
[1] "asdf ,jkl "