次のような文字列があります。
\r\n \r\n 何とかテキスト \r\n \r\n \r\n \r\n 他のテキスト \r\n \r\n \r\n \r\n 何とか何とか \r\n \r\n \r\n r\n
<br>
複数の改行のインスタンスを 1 つのタグと単一の \r\n に置き換えたい<br>
したがって、上記のテキストは次のようになります。
<br> Some text blahblah <br><br> Some other text <br><br> blah blah blah <br>
これを試してみましたが、間のスペースが考慮されていません: \r\n \r\n
Regex.Replace(text, @"[\r\n]+", "<br>")