using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @".*\/(en|nl|fr|de|es|fi|it|tr|cs|da|no|sv|pt)\/(free|gratis|generateur|kostenloser).*\-(generator|gratuit)";
string input = @"https://www.voicebooking.com/en/free-voice-over-generator
https://www.voicebooking.com/nl/gratis-voice-over-generator
https://www.voicebooking.com/fr/generateur-voix-off-gratuit
https://www.voicebooking.com/de/kostenloser-voice-over-generator
https://www.voicebooking.com/es/free-voice-over-generator
https://www.voicebooking.com/fi/free-voice-over-generator
https://www.voicebooking.com/it/free-voice-over-generator
https://www.voicebooking.com/tr/free-voice-over-generator
https://www.voicebooking.com/cs/free-voice-over-generator
https://www.voicebooking.com/da/free-voice-over-generator
https://www.voicebooking.com/no/free-voice-over-generator
https://www.voicebooking.com/sv/free-voice-over-generator
https://www.voicebooking.com/pt/free-voice-over-generator
";
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