[Javascript] If a string contains many ' and " and \"

Andrew Gibson andyg at ihug.co.nz
Tue Jul 8 18:04:44 CDT 2003


As an aside I was stuck with a similar problem, how to deal with the
following string

str="Try the "following" folder:  d:\"this folder  "

I can replace "  with \"  for the normal "  within the string but to save to
d:\"  I couldn't just add a \ to make it d:\\"  it would only work when I
made it d:\\\"

Andrew Gibson





More information about the Javascript mailing list