using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"{\s*[""']\s*streamUrl\s*[""']\s*:\s*[""']\s*(http[^""']+)";
string input = @"""language"":[""Français""],""logo100x100"":""http://static.radio.fr/images/broadcasts/15/43/8275/1/c100.png"",
""streamUrls"":[{""streamUrl"":""http://mp3lg4.tdf-cdn.com/9243/lag_164753.mp3"",""loadbalanced"":false,
""metaDataAvailable"":false,""playingMode"":""STEREO"",""type"":""STREAM"",""sampleRate"":44100,""streamContentFormat"":""MP3"",
""bitRate"":128,""idBroadcast"":8275,""sortOrder"":0,""streamFormat"":""ICECAST"",""id"":47609,""streamStatus"":""VALID"",
""contentType"":""audio/mpeg""},{""streamUrl"":""http://mp3lg3.scdn.arkena.com/10490/virginradio.mp3"",""loadbalanced"":false,
""metaDataAvailable"":false,""playingMode"":""STEREO"",""type"":""STREAM"",""sampleRate"":44100,""streamContentFormat"":""MP3"",
""bitRate"":64,""idBroadcast"":8275,""sortOrder"":1,""streamFormat"":""ICECAST"",""id"":57003,""streamStatus"":""VALID"",
""contentType"":""audio/mpeg""}],""playable"":""PLAYABLE"",""genres"":[""Pop"",""Rock""],
""logo175x175"":""http://static.radio.fr/images/broadcasts/15/43/8275/1/c175.png"",""
";
RegexOptions options = RegexOptions.Multiline | RegexOptions.IgnoreCase;
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