Use Regex.
The Regex pattern in this case is
\d+.\d+
which means one or more number of digits (\d+) separated by a dot. If you want to have fixed number of decimal, say 2, then add {2} to the last one like this:
\d+.\d+{2}
Try to adapt from the example:
using System;
using System.Text.RegularExpressions;
public class Program
{
public static void Main()
{
string str = "Validated AMT_RETENT in TBILL_DETAIL Table: [E]64.45 - [A]64.46";
Match match = Regex.Match(str, @"\d+.\d+");
while (match.Success)
{
Console.WriteLine(match.Value);
match = match.NextMatch();
}
}
}
The outcome will be:
64.45
64.46
Learn more:
1.
The 30 Minute Regex Tutorial[
^]
2.
http://www.dotnetperls.com/regex-match[
^]