using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(MB_PKW|MB_VAN|MB_LKW|Omnibus)\/xports\/QL\/QL_AS_(.+?)\.xml";
string input = @"/Omnibus/xports/EDAS/EvoBus_ABS02T.edas.xml
/MB_VAN/xports/EDAS/VAN_AIRBAG470.edas.xml
/MB_LKW/xports/edas/LKW_VRDU01T.edas.xml
/MB_PKW/xports/EDAS/PKW_ADAS_GW453.edas.xml
/MB_VAN/xports/QL/QL_AS_CONNECT907.xml
";
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