using System.Text.RegularExpressions;
public static void Main()
Regex regex = new Regex(@"(cd)+");
Match match = regex.Match("cdcdde");
Console.WriteLine("Match Value: " + match.Value);
regex = new Regex(@"d|e");
match = regex.Match("edge");
Console.WriteLine("Match Value: " + match.Value);
string input = "One-Two-Three";
regex = new Regex(@"One([A-Za-z0-9\-]+)Three");
match = regex.Match(input);
string v = match.Groups[1].Value;
Console.WriteLine("Between One and Three: {0}", v);
string input1 = "Left12345Right";
Regex expression = new Regex(@"Left(?<middle>\d+)Right");
match = expression.Match(input1);
string result = match.Groups["middle"].Value;
Console.WriteLine("Middle: {0}", result);