You may try this:
using System;
using System.Text.RegularExpressions;
class Program
{
static void Main(string[] args)
{
string
input = "Hello World!",
keyword = "Hello";
var result = Regex
.Replace(input, keyword, m =>
String.Format("<b>{0}</b>", m.Value));
Console.WriteLine(result);
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…