反向引用组-C#入门经典ppt

时间:2021-04-25 02:48:11
【文件属性】:
文件名称:反向引用组-C#入门经典ppt
文件大小:4.81MB
文件格式:PPT
更新时间:2021-04-25 02:48:11
C#入门 反向引用组 string speech = "Four score and and seven years"; pat = @"(\b[a-zA-Z]+\b)\s\1"; //pat = @"(?\b[a-zA-Z]+\b)\s\k< repeatand>"; MatchCollection mc = Regex.Matches(speech, pat); foreach (Match mt in mc) { Console.WriteLine(mt); //Console.WriteLine(mt.Groups[repeatand]); }

网友评论