You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regex in NextJS results in an error (browser - Chrome 125):
Regex run in the browser console gives a working result (browser - Chrome 125):
Alternative
You can use and perform various operations on the index values (0-6 in the working example above).
Proposal
This feature could initially be supported by setting an experimental option in next.config.mjs or some other "opt-in" mechanism. Perhaps the browserlist could be used or babel or SWC.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Support regular expressions with duplicate named capturing groups that are in different disjunction alternatives.
Non-Goals
No response
Background
Links
This restriction is relaxed if...
Example
Regex in NextJS results in an error (browser - Chrome 125):

Regex run in the browser console gives a working result (browser - Chrome 125):

Alternative
You can use and perform various operations on the
index
values (0-6 in the working example above).Proposal
This feature could initially be supported by setting an
experimental
option innext.config.mjs
or some other "opt-in" mechanism. Perhaps the browserlist could be used or babel or SWC.Beta Was this translation helpful? Give feedback.
All reactions