I’ve been trying all day with no luck to regex replace the new line "\n" with a "<br />" but outside a code block like a "**[code]**some code...**[/code]**".
For example if I have the following
string myString = "Good luck **\n** thanks [code]my **\n** name[/code]";
How to replace the line breaks "\n" with "<br />" outside the code tag only, using regular expression?
Well, after trying and failing so many times I came up with the following code and it worked, it’s vb.net BTW.
I hope this helps someone else.