0
 data[i].replace('\\10.10.12\AxDocuments\', '') 

I am trying to replacing this string to space but I don't make it

1
  • Just replace all single slash by double slash Commented Jul 23, 2016 at 9:32

2 Answers 2

1

Backslashes have to be escaped. If you are looking for a string that starts with 2 backslashes, use the following:

data[i].replace('\\\\10.10.12\\AxDocuments\\', '')
Sign up to request clarification or add additional context in comments.

Comments

0

Try This

 var str = 'a/b/c';

    var replaced = str.replace('\', ' ');

    var replaced = str.replace(/ /g, ' ');

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.