Skip to content
JS
JavaScript error

SyntaxError

The JavaScript exception "raw bracket is not allowed in regular expression with unicode flag" occurs when a Unicode-aware regular expression pattern contains a raw bracket ({, }, ]) that is not part of a quantifier or character class.

Reference entryJavaScriptFetched
SyntaxError: Invalid regular expression: /{/u: Lone quantifier brackets (V8-based)
As listed by MDN Web Docs
SyntaxError: raw bracket is not allowed in regular expression with unicode flag (Firefox)
As listed by MDN Web Docs
SyntaxError: Invalid regular expression: incomplete {} quantifier for Unicode pattern (Safari)
As listed by MDN Web Docs
SyntaxError: Invalid regular expression: unmatched ] or } bracket for Unicode pattern (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.