Skip to content
JS
JavaScript error

SyntaxError

The JavaScript exception "invalid property name in regular expression" or "invalid class property name in regular expression" occurs when the \p and \P Unicode character class escapes are not followed by a valid Unicode property name and/or value.

Reference entryJavaScriptFetched
SyntaxError: Invalid regular expression: /\p{x}/u: Invalid property name (V8-based)
As listed by MDN Web Docs
SyntaxError: Invalid regular expression: /[\p{x}]/u: Invalid property name in character class (V8-based)
As listed by MDN Web Docs
SyntaxError: invalid property name in regular expression (Firefox)
As listed by MDN Web Docs
SyntaxError: invalid class property name in regular expression (Firefox)
As listed by MDN Web Docs
SyntaxError: Invalid regular expression: invalid property expression (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.