I am new to Javascript
coding. The current task I am working on is creating HTML Documents from a text document.In a particular case, I have a complex string (alphanumeric string with backslashes). I need the HTML to print it the way the text is present.
However, the HTML created escapes all backslashes.
Input Text:
3583859858.8200040004xxxx\00\0200040004\t0\t194.3\t39874\t7975\t90\t62\t0.1\t194.3\t200\t35.00\t35.00\t35.00\t194\t2.1\t12541\t12650\t13468\t13421\t13481\t13932\t35.00\t35.00\n
Output in HTML:
3583859858.8200040004xxxx0040004 0t194.3 39874 7975 90 62 0.1 194.3 200 35.00 35.00 35.00t194 2.1 12541 12650 13468 13421 13481 13932 35.00 35.00
I tried below solutions to other relevant questions but it did not work
How to escape backslash in JavaScript?
Backslashes - Regular Expression - Javascript
How can I replace a backslash with a double backslash using RegExp?
Request help from seniors here