diff --git a/moment.js b/moment.js
index <HASH>..<HASH> 100644
--- a/moment.js
+++ b/moment.js
@@ -80,7 +80,7 @@
             currentMinutes = date.getMinutes(),
             currentSeconds = date.getSeconds(),
             currentZone = date.getTimezoneOffset(),
-            charactersToReplace = /(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|zz?|ZZ?|LT|LL?L?L?)/g,
+            charactersToReplace = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|zz?|ZZ?|LT|LL?L?L?)/g,
             nonuppercaseLetters = /[^A-Z]/g,
             timezoneRegex = /\([A-Za-z ]+\)|:[0-9]{2} [A-Z]{3} /g,
             ordinal = moment.ordinal,
@@ -190,7 +190,7 @@
                 return formatDate(date, moment.longDateFormat[input]);
             // DEFAULT
             default :
-                return input.replace("\\", "");
+                return input.replace(/(^\[)|(\\)|\]$/g, "");
             }
         }
         return inputString.replace(charactersToReplace, replaceFunction);
Adding escape blocks `[escaped]`

This is equivalent to escaping each character