using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"""([\d\-\:\.]+)"":{""value"":""?([\d]+)""?";
string input = @"{""0-0:96.1.1"":{""value"":""54978381""},""0-0:1.0.0"":{""value"":0,""time"":1696963760},""1-0:1.8.0"":{""value"":743,""time"":1696963760},""1-0:2.8.0"":{""value"":0,""time"":1696963760},""1-0:3.8.0"":{""value"":0,""time"":1696963760},""1-0:4.8.0"":{""value"":203,""time"":1696963760},""1-0:1.7.0"":{""value"":303443.1,""time"":1696963760},""1-0:2.7.0"":{""value"":612.3,""time"":1696963760},""1-0:3.7.0"":{""value"":541.3,""time"":1696963760},""1-0:4.7.0"":{""value"":140247.8,""time"":1696963760},""0-0:2.0.0"":{""value"":1653,""time"":0},""api_version"":""v1"",""name"":""54978381"",""sma_time"":8291.3}";
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