using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"""width""\s*:\s*(?'width'\d+).+?""height""\s*:\s*(?'height'\d+).+?""url""\s*:\s*\""(?'url'.+?)""";
string input = @"<pre>#34;, ""createdAt"": ""2018-07-30T13:33:21.373947""}, {""uid"": ""c442c352934545b183e16ce9aebd91cb"", ""width"": 2048, ""options"": {""format"": ""R"", ""quality"": 88}, ""updatedAt"": ""2018-08-01T17:51:24.738232"", ""height"": 2048, ""size"": 618478, ""url"": ""https://media.sketchfab.com/urls/ea1adc30399045a2b101e16ba65a856f/dist/textures/a4291782af5f4ce39e637c89ec91fa9b/c442c352934545b183e16ce9aebd91cb.jpeg"", ""createdAt"": ""2018-08-01T17:51:25.334608""}, {""uid"": ""84275b9d01b54836893e355991288c2f"", ""width"": 1024, ""options"": {""format"": ""R"", ""quality"": 92}, ""updatedAt"": ""2018-08-01T17:51:25.341010"", ""height"": 1024, ""size"": 220485, ""url"": ""https://media.sketchfab.com/urls/ea1adc30399045a2b101e16ba65a856f/dist/textures/a4291782af5f4ce39e637c89ec91fa9b/84275b9d01b54836893e355991288c2f.jpeg"", ""createdAt"": ""2018-08-01T17:51:25.451079""}, {""uid"": ""88897653dc004ded9faee4eaf2fa0373"", ""width"": 512, ""options"": {""format"": ""R"", ""quality"": 95}, ""updatedAt"": ""2018-08-01T17:51:25.456671"", ""height"": 512, ""size"": 83896, ""url"": ""https://media.sketchfab.com/urls/ea1adc30399045a2b101e16ba65a856f/dist/textures/a4291782af5f4ce39e637c89ec91fa9b/88897653dc004ded9faee4eaf2fa0373.jpeg""";
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