I have the following regular expression in an R script:
grepl("\xe9", "MY TEXT", fixed = FALSE, ignore.case = TRUE, perl = FALSE)
I get the following error:
Error in grepl("\xe9", "MY TEXT", fixed = FALSE, ignore.case = TRUE, :
regular expression is invalid in this locale
“\xe9” is unicode representation of “é” and is read as-is from a file.
How can I fix this? Additionally, is there a useful resource on locales w.r.t regular expression in R?
I don’t know why @joran didn’t just post this as an answer: