using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"\/s1600-h\/[^\/\s'""]+";
string input = @"http://localhost/wpcomics/wp-content/images/_Tkt_A2r1p6I/RYijDxlcBEI/AAAAAAAAAEU/DDbPKl6WZ30/s1600-h/tedsobject.jpg
http://localhost/wpcomics/wp-content/images/_Tkt_A2r1p6I/RYijDxlcBEI/AAAAAAAAAEU/DDbPKl6WZ30/s400/tedsobject.jpg
http://localhost/wpcomics/wp-content/images/_Tkt_A2r1p6I/RYgspBlcBDI/AAAAAAAAAEI/rNF6YqYaaaA/s1600-h/artoutoftimebook.jpg
http://localhost/wpcomics/wp-content/images/_Tkt_A2r1p6I/RYgspBlcBDI/AAAAAAAAAEI/rNF6YqYaaaA/s400/artoutoftimebook.jpg
http://localhost/wpcomics/wp-content/images/_Tkt_A2r1p6I/RYaXmhlcBCI/AAAAAAAAAD8/YL8YxxkAAzk/s1600-h/funnyfables.jpg";
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