^的使用:^可以定位开头位置
static void Main(string[] args)
{
string s = "i am a boy";
string str=Regex.Replace(s, "^", "here");
Console.WriteLine(str);
Console.ReadKey();
}
的使用:$可以定位结尾位置
string res = Regex.Replace(s, "$", " you know that");
Console.WriteLine(res);
Console.ReadKey();