using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"""window_indicator"":\s*([\-\d\.]+)";
string input = @"Line1\{""_check_id"":""09b0f4e658a86000"",""_check_name"":""Window status check"",""_level"":""info"",""_measurement"":""notifications"",""_message"":""Check: Window status check is: info 0"",""_notification_endpoint_id"":""09b162491aca8000"",""_notification_endpoint_name"":""nc:8087"",""_notification_rule_id"":""09b18e2dabebc000"",""_notification_rule_name"":""Status is INFO notification rule (2m)"",""_source_measurement"":""window_indicator"",""_source_timestamp"":1658233200000000000,""_start"":""2022-07-19T12:19:00Z"",""_status_timestamp"":1658233200000000000,""_stop"":""2022-07-19T12:22:00Z"",""_time"":""2022-07-19T12:22:00Z"",""_type"":""threshold"",""_version"":1,""window_indicator"":0}";
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