using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(.+) (HC|PO|bbt|bty|bjx|prs|bag|gls|nst|resort|shs|cts|atm|bls|gls|jck|clp|fsh|glv|bck|blt|drs|sle|hts|emn|ham|pre fall|str|pnt|skr|mat|m PO|bks|m |PreFall|Resort|brd|LO|AR|sok|F |S )|.+";
string input = @"London str F20 212.jpg London
Luisa Spagnoli bbt S22 048.jpg Luisa Spagnoli
Marco Rambaldi bjx S22 006.jpg Marco Rambaldi
Max Mara bag S22 002.jpg Max Mara";
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