using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"^""*status:([0-9]{1,3}), body:{""code"":[0-9]{3},""message"":([0-9a-z"":\/\\\s-_.,]*?),""errorStack"".*$";
string input = @"""status:400, body:{""code"":400,""message"":""transaction failed:01070333:3: Virtual Server /Common/agc_idp_10.app/agc_idp_10_vs illegally shares destination address, source address, service port, ip-protocol, and vlan with Virtual Server /Common/agc_200.app/agc_200_vs."",""errorStack"":[],""apiError"":2}""
";
RegexOptions options = RegexOptions.IgnoreCase;
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