using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(https?):\/\/([0-9a-z.\-\/]+)";
string input = @"<div class=""filefield-file""><img class=""filefield-icon field-icon-application-vnd-ms-excel"" alt=""application/vnd.ms-excel icon"" src=""http://uristhome.ru/sites/all/modules/filefield/icons/x-office-spreadsheet.png""><a href=""https://uristhome.ru/sites/default/files/doc/ks-6a.xls"" type=""application/vnd.ms-excel; length=51712"" title=""ks-6a.xls"">Типовой бланк и форма КС-6а</a></div>
";
foreach (Match m in Regex.Matches(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