diff --git a/src/impl/regexParser.js b/src/impl/regexParser.js index 0b0297b1f..628108a82 100644 --- a/src/impl/regexParser.js +++ b/src/impl/regexParser.js @@ -229,7 +229,7 @@ function extractRFC2822(match) { function preprocessRFC2822(s) { // Remove comments and folding whitespace and replace multiple-spaces with a single space return s - .replace(/\([^)]*\)|[\n\t]/g, " ") + .replace(/\([^()]*\)|[\n\t]/g, " ") .replace(/(\s\s+)/g, " ") .trim(); }