using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?<=Value=).*?(?=})";
string input = @"{[Response[attributes={Status=Success, action=Retrieve}; value=[NameList[attributes={PropertyName=Name}; value=[Names[attributes={}; value=[SimplePair[attributes={Key=-, Value=-}; value=[]], SimplePair[attributes={Key=Preferences, Value=Preferences}; value=[]], SimplePair[attributes={Key=&DEFAULT_PREFERENCE, Value=Default}; value=[]], SimplePair[attributes={Key=Profile, Value=Profile}; value=[]], SimplePair[attributes={Key=Duty Manager, Value=Duty Manager}; value=[]], SimplePair[attributes={Key=Mode User, Value=Mode User}; value=[]], SimplePair[attributes={Key=ModeDisplay Profile, Value=Mode Display Profile}; value=[]], SimplePair[attributes={Key=Mode Manager, Value=Mode Manager}; value=[]], SimplePair[attributes={Key=Professional Employees, Value=Professional Employees}; value=[]], SimplePair[attributes={Key=Scheduler, Value=Scheduler}; value=[]], SimplePair[attributes={Key=Super Access, Value=Super Access}; value=[]], SimplePair[attributes={Key=keeper, Value=keeper}; value=[]], SimplePair[attributes={Key=Manager, Value=Manager}; value=[]]]]]]]]]}";
RegexOptions options = RegexOptions.Multiline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx