using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?:(?!video).)*video\/(\d+)\/";
string input = @"https://www.iesdouyin.com/share/video/7039240821144702223/?region=CN&mid=7039240839087803150&u_code=19ambj1ae&did=MS4wLjABAAAAif33DuCPz8E4TM8ohLFknanLbAaeYNGHZvIMdpUGZBk&iid=MS4wLjABAAAAbcVu-zX1os-3_V1-tnqKfcfhYUGKXPsJhcECdsvolcDBQetzxujmh6J5MwxRPIAa&with_sec_did=1&titleType=title×tamp=1639030688&utm_campaign=client_share&app=aweme&utm_medium=ios&tt_from=copy&utm_source=copy
{START}(?:(?!{END}).)*{END}";
RegexOptions options = RegexOptions.Multiline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx