using System;
using System.Text.RegularExpressions;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
  string txt="08:Nov:2018 \"This is an Example!\"";
  string re1=".*?";
  string re2="(2)";
  string re3=".*?";
  string re4="((?:[a-z][a-z]+))";
  Regex r = new Regex(re1+re2+re3+re4,RegexOptions.IgnoreCase|RegexOptions.Singleline);
  Match m = r.Match(txt);
  if (m.Success)
  {
  String d1=m.Groups[1].ToString();
  String word1=m.Groups[2].ToString();
  Console.Write("("+d1.ToString()+")"+"("+word1.ToString()+")"+"\n");
  }
Console.ReadLine();
}
}
}
|