C#(a.cs)
using System;
public class Test
{
public void Middle(string start, string end)
{
string pat1 = string.Format("(?<={0}).*(?={1})", start, end);
Console.WriteLine(pat1);
string pat2 = string.Format("(?<={{0}}).*(?={{1}})", start, end);
Console.WriteLine(pat2);
string pat3 = string.Format("(?<={{{0}}}).*(?={{{1}}})", start, end);
Console.WriteLine(pat3);
}
public static void Main(string[] args)
{
string start = "12";
string end = "35";
Test t = new Test();
t.Middle(start, end);
}
}using System;
public class Test