Hello,
We would like to do a replace in our string like this: - Every time a \n (new line) or \t (tab) or \r (carriage return) appears, it should be replaced by the string "\n" or "\t" or "\r".
For example, this string:
"Hello, how
are you?
Fine thanks."
Should be replaced by:
"Hello, how\n\tare you?\nFine thanks."
Could you help us? We are trying with this code in Jscript (replace() method) but it doesn't work:
myString.replace(/([\n|\t])/g, "\\$1");
THANKS!