Skip to content

Commit

Permalink
Limiting regex match to 256 chars, fixing moment#4163
Browse files Browse the repository at this point in the history
  • Loading branch information
migg24 committed Nov 28, 2017
1 parent c3b5d06 commit 5c9d630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moment.js
Expand Up @@ -659,7 +659,7 @@ var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123

// any word (or two) characters or numbers including two/three word month in arabic.
// includes scottish gaelic two word and hyphenated months
var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;
var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;


var regexes = {};
Expand Down

0 comments on commit 5c9d630

Please sign in to comment.