using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"^(Name="")(Show_Type""|Licensing_Window_End""|Display_As_New"")(\s+Value=""[A-Za-z0-9-:\s]+"")([\/>\s]+)(.*)$";
string input = @"App_Data App=""MOD"" Name=""Genre"" Value=""Series""/><App_Data App=""MOD""
Name=""Show_Type"" Value=""Series""/><App_Data App=""MOD"" Name=""Billing_ID""
Value=""10092""/><App_Data App=""MOD"" Name=""Licensing_Window_Start""
Value=""2019-05-07 00:00:00""/><App_Data App=""MOD""
Name=""Licensing_Window_End"" Value=""2019-05-13 23:59:59""/><App_Data
App=""MOD"" Name=""Preview_Period"" Value=""0""/><App_Data App=""MOD""
Name=""Display_As_New"" Value=""4""/><App_Data App=""MOD""
Name=""Display_As_Last_Chance"" Value=""7""/><App_Data App=""MOD""
Name=""Provider_QA_Contact"" Value=""NBC Universal""/><App_Data App=""MOD""
Name=""Suggested_Price"" Value=""0.00""/><App_Data App=""MOD"" ";
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