I am trying to replace "/?" by "?" in the following URL with R :
http://www-03.ibm.com/systems/fr/express/offerings/systemx_intel/?cmp=333AD&c
So it will become :
http://www-03.ibm.com/systems/fr/express/offerings/systemx_intel?cmp=333AD&c
I have tried different functions to replace it (str_replace_all, ...) but I have always the same issue, it cannot find the string "/?" because it is two special characters.
This is how to use the regex replacement function sub in this case:
x <- 'http://www-03.ibm.com/systems/fr/express/offerings/systemx_intel/?cmp=333AD&c'
sub('/\\?','?',x)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With