真ん中が変わる可能性のある文字列の最初と最後を一致させるために使用しようとしているコードがあります。私は最初にこの例を機能させようとしています。誰かがこのコードのエラーと、それがまったく一致しない理由を教えてください。
string pattern = @"/\/>[^<]*abc/";
string text = @"<foo/> hello first abc hello second abc <bar/> hello third abc";
Regex r = new Regex(pattern, RegexOptions.IgnoreCase);
Match m = r.Match(text);