Here is the answer using a regular expression, as the OP asked. ;-)
To use the regex, put the rewrite text in match (), and then replace this match with nothing (string.empty):
string text = @"werfds_tyer.abc.zip.ytu_20111223170226_20111222.20111222"; string pattern = @"(\.zip\.ytu)"; Console.WriteLine( Regex.Replace(text, pattern, string.Empty ));
NTN
source share