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

前端 未结 6 1970
你的背包
你的背包 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:55

    If you're trying to match line endings then you may find

    Regex.Match("string", "regex", RegexOptions.Multiline)
    

    helps

提交回复
热议问题