views:

29

answers:

1

I can use the AJAX call to read a text file, but the problem is it read the \n\t, and the symbol '\' (Backslash), it is not necessary for me, How can I ignore it to pure text msg....?

+1  A: 

Something like this?

text = text.replace (/\s+/g, " ")
text = text.replace (/\\'/g, "'")
Kinopiko
that's nice, I want to ignore the "\" too, how can I do it?
Ted Wong