[C#/General] RegularExpressions : repeated word 찿기 패턴


[C#/General] RegularExpressions : repeated word 찿기 패턴

> 반복적으로 들어간 단어들을 검색하는 패턴 using System; using System.Text.RegularExpressions; public class Example { public static void Main() { // 반복된 단어 검색 패턴을 설명합니다. Regex rx = new Regex(@"\b(?\w+)\s+(\k)\b", RegexOptions.Compiled | RegexOptions.IgnoreCase); // Define a test string. string text = "Red red is the The Test test, Codekiller, codekiller"; // 매치 항목 Collection 을 찿습니다. MatchCollection matches = rx.M..


원문링크 : [C#/General] RegularExpressions : repeated word 찿기 패턴