I have a problem with converting \n to < br/>.
The text I want to convert is test\ntest\n\ntest
I want it to be like test<br />test<br /><br />test
.
So every \n needs to be replaced with <br />
.
Now I'm using this code:
Regex regex = new Regex(@"(\n)+");
string ticketCategorieOmschrijving = regex.Replace("test\ntest\n\ntest", "<br />");
But this code replaces \n\n
to a single <br />
, while it needs to be <br /><br />
Can someone help?
");` – Simon Wilson Jun 03 '20 at 10:19