diff --git a/lib/util/named-group-regexp.js b/lib/util/named-group-regexp.js index 0a927dd8..3eaeb787 100644 --- a/lib/util/named-group-regexp.js +++ b/lib/util/named-group-regexp.js @@ -14,7 +14,7 @@ const pattern = [ '[>\']', // Get everything up to the end of the capture group: this is the RegExp used // when matching URLs to this route, which we can use for validation purposes. - '([^\\)]*)', + '([^\\)]*(\\))?)\\??', // Capture group end '\\)', ].join( '' );