Regex Replace Double Slash

CSharp · Console

/Program.cs

using System;
using System.Text.RegularExpressions;

public class Program
{
    public static void Main()
    {
        const string originalPath = @"file:\\mail\attach\2015_02\random file name";
        var newPath = Regex.Replace(originalPath, @"file:\\{2}(.+)", @"file:\$1");
        Console.WriteLine(newPath);
    }
}
;