using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"""temp"":(.*?),";
string input = @"{""vin"":810,""vout"":283,""cin"":46,""cout"":133,""temp"":34,""charge"":75,""relay"":0,""pwr"":3753,""vch"":303,""vfl"":303,""ich"":40,""ifl"":1,""v_relay_on"":260,""v_relay_off"":250,""mppt_percent"":75,""snd_ena"":1,""light_mode"":1,""contrOn"":1,""bat_lo"":240,""bat_hi"":297,""ssidPass"":""pass"",""ssid"":""GardenNet"",""iLogin"":""login"",""iPass"":""pass"",""cloudName"":""url"",""cloudKey"":""api_key"",""ApPass"":""11111111"",""relay_mode"":0,""mppt_mode"":3,""st_mode"":0,""refr"":10,""modd"":18,""eday"":71,""etot"":7,""sec"":32,""min"":59,""hour"":14,""date"":5,""month"":1,""year"":19}";
Match m = Regex.Match(input, pattern);
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