@@ -680,7 +680,7 @@ function getParseRegexForToken (token, config) {
680
680
681
681
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
682
682
function unescapeFormat ( s ) {
683
- return regexEscape ( s . replace ( '\\' , '' ) . replace ( / \\ ( \[ ) | \\ ( \] ) | \[ ( [ ^ \] \[ ] * ) \] | \\ ( .) / g, function ( matched , p1 , p2 , p3 , p4 ) {
683
+ return regexEscape ( s . replace ( / \\ / g , '' ) . replace ( / \\ ( \[ ) | \\ ( \] ) | \[ ( [ ^ \] \[ ] * ) \] | \\ ( .) / g, function ( matched , p1 , p2 , p3 , p4 ) {
684
684
return p1 || p2 || p3 || p4 ;
685
685
} ) ) ;
686
686
}
@@ -1477,9 +1477,9 @@ function localeWeekdaysParse (weekdayName, format, strict) {
1477
1477
1478
1478
mom = createUTC ( [ 2000 , 1 ] ) . day ( i ) ;
1479
1479
if ( strict && ! this . _fullWeekdaysParse [ i ] ) {
1480
- this . _fullWeekdaysParse [ i ] = new RegExp ( '^' + this . weekdays ( mom , '' ) . replace ( '.' , '\.?' ) + '$' , 'i' ) ;
1481
- this . _shortWeekdaysParse [ i ] = new RegExp ( '^' + this . weekdaysShort ( mom , '' ) . replace ( '.' , '\.?' ) + '$' , 'i' ) ;
1482
- this . _minWeekdaysParse [ i ] = new RegExp ( '^' + this . weekdaysMin ( mom , '' ) . replace ( '.' , '\.?' ) + '$' , 'i' ) ;
1480
+ this . _fullWeekdaysParse [ i ] = new RegExp ( '^' + this . weekdays ( mom , '' ) . replace ( '.' , '\\ .?' ) + '$' , 'i' ) ;
1481
+ this . _shortWeekdaysParse [ i ] = new RegExp ( '^' + this . weekdaysShort ( mom , '' ) . replace ( '.' , '\\ .?' ) + '$' , 'i' ) ;
1482
+ this . _minWeekdaysParse [ i ] = new RegExp ( '^' + this . weekdaysMin ( mom , '' ) . replace ( '.' , '\\ .?' ) + '$' , 'i' ) ;
1483
1483
}
1484
1484
if ( ! this . _weekdaysParse [ i ] ) {
1485
1485
regex = '^' + this . weekdays ( mom , '' ) + '|^' + this . weekdaysShort ( mom , '' ) + '|^' + this . weekdaysMin ( mom , '' ) ;
0 commit comments