Try following :
using System.Linq;
using System.Text;
using System.IO;
using System.Text.RegularExpressions;
namespace ConsoleApplication1
{
class Program
{
const string FILENAME = @"c:\temp\test.txt";
static void Main(string[] args)
{
string input = File.ReadAllText(FILENAME);
StringReader reader = new StringReader(input);
string line = "";
string pattern = @"time=(?'time'\d+)";
while((line = reader.ReadLine()) != null)
{
if (line.StartsWith("Reply from"))
{
Match match = Regex.Match(line,pattern);
Console.WriteLine(match.Groups["time"].Value);
}
}
Console.ReadLine();
}
}
}
solved Extract special characters from a text in C#