I am trying to fetch just the text within the double angle brackets: from a text like this , However it returns me the whole string, while i just want to fetch the text within the double <<>> brackets.
line2="Name: <<NAME>> (<<COURSE>>)"
var pattern=@"<<.*?>>";
MatchCollection matches= Regex.Matches(line2,pattern);
Am i doing it correctly , please guide?