Hi I need to remove all the spaces and new line command(\n) from the web content. How can i remove it using the regular expression
3 Answers
Accepted Answer
string.replace(/\s|\n|\r/g, "");
Try this:
var s = "test 123\nline 2\n\nline 4"; s.replace(/\s/g, '');
Hi Nishanth,
Refere this link that may help you.Best luck
Your Answer
Think you can help? Login to answer this question!