-
Notifications
You must be signed in to change notification settings - Fork 22.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regular expression: n in x{n}, x{n,}, x{n,m} can be any integer in quantifier expression #33486
Labels
Content:JS
JavaScript docs
Comments
jasonren0403
added
the
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
label
May 8, 2024
/a{-1,}/u // Uncaught SyntaxError: Invalid regular expression: /a{-1,}/u: Incomplete quantifier What |
Josh-Cena
added
closed: question
A user misinterpretation or support question. No action required.
and removed
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
labels
May 9, 2024
Actually "positive" is wrong. It should say "non-negative". |
Josh-Cena
removed
the
closed: question
A user misinterpretation or support question. No action required.
label
May 9, 2024
github-actions
bot
added
the
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
label
May 9, 2024
Josh-Cena
removed
the
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
label
May 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MDN URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Quantifiers
What specific section or headline is this issue about?
Types
What information was incorrect, unhelpful, or incomplete?
The document says
n
inx{n}
,x{n,}
, andx{n,m}
is a positive integer, but in fact the regexp compiles whenn===0
, and even whenn<0
(seems "invalid" because no one ever use like that).What did you expect to see?
The correct
n
range inx{n}
,x{n,}
, andx{n,m}
is mentioned. The possible 'invalid' usagen<0
may be warned.Do you have any supporting links, references, or citations?
Microsoft docs hints that n could be any integer in
{n}
,{n,}
, and{n,m}
.Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/javascript/guide/regular_expressions/quantifiers
The text was updated successfully, but these errors were encountered: