I'm writing a md2html compiler in F# and I want to replace the ** surrounding texts with <b> and </b> tags.
e.g.
this is **bold** will be changed to this is <b>bold</b>
I am trying to accomplish this with Regex.Replace method using the pattern (\*\*).*?(\*\*). So the first capturing group will be replaced by <b> and the second one will be replaced by </b> I would like to know how I can specify the replacement for these different "capturing groups" rather than the entire regex match?