using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"B[lr]?il?aul?[td]";
string input = @"Healer's Briault renamed to Healer's Bliaut
Cleric's Briault renamed to Cleric's Bliaut
Hlr. Briault +1 renamed to Hlr. Bliaut +1
Clr. Briault +1 renamed to Clr. Bliaut +1
Orison Bliaud renamed to Orison Bliaut
Orison Bliaud +1 renamed to Orison Bliaut +1
Orison Bliaud +2 renamed to Orison Bliaut +2
Clr. Briault +2 renamed to Clr. Bliaut +2
Ebers Bliaud renamed to Ebers Bliaut
Ebers Bliaud +1 renamed to Ebers Bliaut +1
Gende. Bilaut +1 renamed to Gende. Bliaut +1
Piety Briault renamed to Piety Bliaut
Piety Briault +1 renamed to Piety Bliaut +1
Piety Briault +2 renamed to Piety Bliaut +2
Piety Briault +3 renamed to Piety Bliaut +3
Theo. Briault renamed to Theo. Bliaut
Theo. Briault +1 renamed to Theo. Bliaut +1
Theo. Briault +2 renamed to Theo. Bliaut +2
Theo. Briault +3 renamed to Theo. Bliaut +3";
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