using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(\d{1}\.\d{5,8}|0)\s";
string input = @"0.1766155 0.1658146 0.3464225 0.258326 1.040629 0.3123467 0.7877846 0.1264636 0.1854926 2.235324 0 0.3128409 0.5384811 0.2159374 0.1659985 0.2901815 0.08226276 0.1323811 0.1374549 0.04583898 0.1653796 0.02095086 0.1465107 ";
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