I have a row that I received from my DB, so in R it looks like this:
a <- c("www", "x", "yes", "\303\243")
> a
[1] "www" "x" "yes" "ã"
What I want to do is find which of the elements has a backslash in it. I tried:
grepl('\\',a[4])
But I keep getting the error
invalid regular expression '\', reason for "Trailing backslash"
regardless of whether i use cat
or fixed=T
.
How to find backslash in a list?
source
share