using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"([^%>\s]+)";
string input = @"51.23%
17.84%
72.31%
59.31%
64.48%
0.19%
1.13%
0.00%
0.00%
32.18%
0.00%
11.68%
35.60%
10.36%
0.00%
50.99%
84.03%
2.96%
47.17%
57.53%
> 90%
64.49%
59.04%
85.09%
74.25%
0.00%
0.00%
85.00%
16.13%
35.09%
12.14%
0.00%
54.82%
86.50%
0.00%
77.30%
0.15%
46.89%
89.56%
34.88%
0.00%
4.66%
0.00%
0.00%
0.00%
24.49%
28.44%
0.00%
0.00%
2.17%
41.77%
11.59%
0.00%
26.14%
0.90%
> 90%
73.00%
15.18%
0.00%
0.00%
7.41%
> 90%
> 90%
63.89%
89.58%
75.06%
85.52%
59.10%
38.19%
44.98%
83.05%
35.33%
62.60%
> 90%
> 90%
15.05%
0.00%
> 90%
15.21%
0.00%
7.26%
0.00%
0.00%";
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