Skip to content
JS
JavaScript error

SyntaxError

The JavaScript exception "nothing to repeat" or "invalid quantifier in regular expression" occurs when a quantifier in a regular expression is applied to nothing or applied to an assertion.

Reference entryJavaScriptFetched
SyntaxError: Invalid regular expression: /\b+/: Nothing to repeat (V8-based)
As listed by MDN Web Docs
SyntaxError: Invalid regular expression: /(?=)+/u: Invalid quantifier (V8-based)
As listed by MDN Web Docs
SyntaxError: nothing to repeat (Firefox)
As listed by MDN Web Docs
SyntaxError: invalid quantifier in regular expression (Firefox)
As listed by MDN Web Docs
SyntaxError: Invalid regular expression: nothing to repeat (Safari)
As listed by MDN Web Docs
Category
SyntaxError
Severity
error
Runtime
both
or press Cmd/Ctrl + Enter. The text is only sent to this site to match it.
Source: MDN Web Docs. Data fetched 2026-09-25T01:48:37.274Z.