This question shows research effort; it is useful and clear
0
This question does not show any research effort; it is unclear or not useful
Bookmark this question.
Show activity on this post.
这感觉应该很简单,但是我在清除从 Microsoft Word 粘贴的内容中的换行符时遇到了麻烦。不是完整的换行符,而是CTRL ENTER在 Word 中显示为返回箭头的字符。我已经尝试过chr(10)、chr(13)、\u000D和\u000A其他一些,但我无法在 string.replace() 中匹配它。我应该寻找不同的角色还是需要使用string.replace方法以外的东西?