using System.Text.RegularExpressions;
public static Regex r = new Regex(@"```json(.*)```", RegexOptions.Singleline);
public static void Main()
var captured = r.Match(test);
Console.WriteLine($"Sample:\n{test}");
Console.WriteLine($"Captured:\n{captured.Groups[1]}");