Quick question for those that know the answer….what is the regex pattern that represents the “^” (the hat sign)? so that I can remove it when doing the following?
gsub("^","","^GSPC")
i.e. the output of the above is not GSPC as would be expected…
You need to escape
^because it is a regex metacharacter (as @Roman notes in comment)