using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"en\/(?:(?!history).)*?\/";
string input = @"https://denissov.ru/en/barracuda_limited/
https://denissov.ru/en/barracuda_chronograph/
https://denissov.ru/en/barracuda_mechanical/
https://denissov.ru/en/speedster/
https://denissov.ru/en/free_rider/
https://denissov.ru/en/nau_automatic/
https://denissov.ru/en/lady_flower/
https://denissov.ru/en/enigma/
https://denissov.ru/en/number_one/
https://denissov.ru/en/history/
https://denissov.ru/en/wordhistory/
https://denissov.ru/en/historyword/
https://denissov.ru/en/histor_y/
https://denissov.ru/en/barracuda_limited/', '_top')"" style=""cursor: pointer;""";
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