I have a piece of code below which I am trying to use to match the start and the end of a string where the middle can change. I am first trying to get this example working could someone please tell me the error with this code and why it is not matching at all.
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);