Regex that matches a newline (\n) in C#

前端 未结 6 1972
你的背包
你的背包 2020-11-30 07:08

OK, this one is driving me nuts.... I have a string that is formed thus:

var newContent = string.Format(\"({0})\\n{1}\", stripped_content, reply)
         


        
6条回答
  •  日久生厌
    2020-11-30 07:54

    You are probably going to have a \r before your \n. Try replacing the \s with (\r\n).

提交回复
热议问题