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

时间:2024-05-16 03:22:55
【文件属性】:

文件名称:反向引用组-C#入门经典ppt

文件大小:4.81MB

文件格式:PPT

更新时间:2024-05-16 03:22:55

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]); }


网友评论