Regex for ^ (the caret symbol)?
On Mon, 21 Jan 2013, mtb954 at gmail.com wrote:
I am trying to search for string that includes the caret symbol, using the
following code:
grepl("latitude^2",temp)
Many regex implementations require us to escape a metacharacter such as '^' by preceeding it with a backslash. This indicates the next character is a literal and not, in this case, the beginning of the line. Try \^ in your statement. Rich