Is there a way to swap out a hyphen (-
) for a backslash (\
) using Javascript? Specifically, how can I change
C-MyDocuments-VisualStudio2008-MyProjects
to
C\MyDocuments\VisualStudio2008\MyProjects
I attempted to use the replace function like this: variable.replace("-", "\")
, but it resulted in an error stating "unterminated string constant."
This task is being done in VS 2008.