Bug 256903 - [JSC] /\p{Number}--]/v; should be a syntax error
Summary: [JSC] /\p{Number}--]/v; should be a syntax error
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-05-17 10:04 PDT by Michael Saboff
Modified: 2023-05-17 13:53 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2023-05-17 10:04:24 PDT
this regular expression should throw a syntax error:

/[\p{Number}--]/v


Steps To Reproduce:

jsc -e "/[\\p{Number}--]/v;"


Results:

JavaScriptCore accepts it.

V8 says:

unnamed:1: SyntaxError: Invalid regular expression: /[\p{Number}--]/v: Invalid character in character class
/[\p{Number}--]/v;
^^^^^^^^^^^^^^^^^
SyntaxError: Invalid regular expression: /[\p{Number}--]/v: Invalid character in character class
Comment 1 Michael Saboff 2023-05-17 10:04:35 PDT
<rdar://109400589>
Comment 2 Michael Saboff 2023-05-17 10:48:56 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13971
Comment 3 EWS 2023-05-17 13:53:06 PDT
Committed 264175@main (84d5c4d59cd7): <https://commits.webkit.org/264175@main>

Reviewed commits have been landed. Closing PR #13971 and removing active labels.