I have a string User name (sales)
and I want to extract the text between the brackets, how would I do this?
I suspect sub-string but I can\'t work out
using System;
using System.Text.RegularExpressions;
private IEnumerable GetSubStrings(string input, string start, string end)
{
Regex r = new Regex(Regex.Escape(start) +`"(.*?)"` + Regex.Escape(end));
MatchCollection matches = r.Matches(input);
foreach (Match match in matches)
yield return match.Groups[1].Value;
}