I've a input string like "===text=== and ===text===" and I want to replace wiki syntax with the corresponding html tag.
input:
===text=== and ===text===
desirable output:
<h1>text</h2> and <h1>text</h2>
but with the following code I get this output:
var regex = new Regex("---(.+)---");
var output = regex.Replace("===text=== and ===text===", "<h1>$1</h1>");
<h1>text=== and ===text</h1>
I know the problem is that my regex matches greedy. But how to make them non greedy.
Thank you and kind regards. Danny