I am writing the md2html compiler in F # and I want to replace the surrounding texts **with <b>and tags </b>.
eg.
this is **bold**will be changed tothis is <b>bold</b>
I am trying to accomplish this using a method Regex.Replaceusing a template (\*\*).*?(\*\*). Thus, the first capture group will be replaced by <b>, and the second will be replaced by </b>. I would like to know how can I specify a replacement for these different “capture groups”, and not for all regex matching?
source
share