How do I replace Unicode hex digits with blanks? While scraping a website, I've found character strings that print as blanks, but are not blanks. For example:
print(str)
prints
3 Max. 11
but
print(charToRaw(str))
prints
33 c2 a0 4d 61 78 2e 20 31 31
How can I replace the hex digits 0xc2a0 with a single blank (" ")?
I have tried
library(stringr)
str_replace_all(str, "[^[:alnum:]]", " ")
But that also replaces the period
gsub("\u00a0", " ", str)
might do the trick. – Shawn