I'm trying to get the location of \
or /
in a string. Below is the code I'm attempting:
x <- "<span id=\"ref_12590587_l\">6,803.61</span>_l>"
gregexpr("\\\", x)
which(strsplit(x, "")[[1]]=="\")
My problem is when I attempt these codes in Rstudio, I get a continue prompt, the REPL prompt becomes +
. These codes work for other characters.
Why I'm getting the continue prompt, even though the \
is quoted in the inverted quotes?
Edit: corrected the string after comment.