CommandLineEncoder.TryEncodeSlashesFollowedByQuotes C# (CSharp) Method

TryEncodeSlashesFollowedByQuotes() private static method

private static TryEncodeSlashesFollowedByQuotes ( string original ) : string
original string
return string
    private static string TryEncodeSlashesFollowedByQuotes(string original)
    {
        var regexPattern = @"\\+""";

            string result = Regex.Replace(original, regexPattern,
                delegate(Match match)
                {
                    string matchText = match.ToString();
                    string justSlashes = matchText.Remove(matchText.Length - 1);
                    return justSlashes + justSlashes + "\"";  //double up the slashes
                });

            return result;
    }