string target = "1.Scope";
int len = 3;
Regex r = new Regex(string.Format(@"(?<={0})([\s\S]{1})",target,"{1,"+len+"}"));
string str = "123 1.Scope 567abc5efgh";
string result = r.Match(str).Value;
Console.WriteLine(result);
1.求长度:
如果长度小于500,要所有字符,
如果长度大于500,用substring取子串