string[] final = new string[result.Length];
for (int splitCount = 0; splitCount < result.Length; splitCount++)
{
MatchCollection match = Regex.Matches(result[splitCount], @"\d+(?:\.\d*)?");
final[splitCount] = string.Empty;
foreach (Match m in match)
{
final[splitCount] += Double.Parse(m.Value, System.Globalization.CultureInfo.InvariantCulture).ToString("F4")+" ";
}
}
Just use the format info in the .ToString() to control the precision.
I changed the regex so that it was a noncapturing group and to allow for decimal point without following digits. E.g., "1234."