In want to format an article with HTML tags programmatically. What is the best way to find a pattern in the article and replace it with itself with the tags appended on each side? More specifically, how can I pass the match into thematch
in the following example:
string formattedArticle
= Regex.Replace(article, "^\d.+", "<em>" + thematch + "</em>");