反向引用组-C#教程实用版 ppt

时间:2021-04-23 19:47:05
【文件属性】:
文件名称:反向引用组-C#教程实用版 ppt
文件大小:4.81MB
文件格式:PPT
更新时间:2021-04-23 19:47:05
C#教程实用版 ppt 反向引用组 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]); }

网友评论