using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"7(?:1(?:7(?:24|3[01]|4[79]|5[089]|6[258])|8(?:3[49]|40|54)|9(?:0[1239]|1[034]|37|49|5[16]|6[48]))|2087|55(?:0[13457]|59|6[179]|7[034]|99))%";
string input = @"71901%
71902%
71903%
71909%
71910%
71911%
71912%
71913%
71914%
71949%
71950%
71951%
71956%
71964%
71968%
72087%
71834%
71937%
71839%
71840%
71854%
71724%
71730%
71731%
71747%
71749%
71750%
71758%
71759%
71762%
71765%
71768%
75501%
75503%
75504%
75505%
75507%
75559%
75561%
75567%
75569%
75570%
75573%
75574%
75599%
";
foreach (Match m in Regex.Matches(input, pattern))
{
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