我有以下字符串
string = "Book Your Domain And Get\n \n\n \n \n \n Online Today."
string = str.replace("\\s","").trim();
哪个返回
str = "Book Your Domain And Get Online Today."
但想要的是
str = "Book Your Domain And Get Online Today."
我试过很多正则表达式,也用谷歌搜索过,但没有运气。并没有找到相关的问题,请帮助,非常感谢提前