Invalid regular expression: /\${[^}]+}/: Incomplete quantifier
See original GitHub issueAfter optimization: /\$\{[^}]+\}/u
-> /\${[^}]+}/u
, I have Invalid regular expression
error:
const regex1 = /\$\{[^}]+\}/u
const regex2 = /\${[^}]+}/u;
VM356:1 Uncaught SyntaxError: Invalid regular expression: /\${[^}]+}/: Incomplete quantifier
at <anonymous>:1:16
(anonymous) @ VM356:1
Same with:
/{{([^{}]+?)}}/gu
->/\{\{([^{}]+?)\}\}/gu
:Lone quantifier brackets
/\$\{$/u
->/\${$/u
:Incomplete quantifier
/^\/([^\\[]|\\.|\[([^\\\]]|\\.)+\])*\/[gimuys]*$/u
->/^\/([^[\\]|\\.|\[([^\\\]]|\\.)+])*\/[gimsuy]*$/u
:Unterminated group
/\$\{[^}]+\}/u
->/\${[^}]+}/u
:Incomplete quantifier
/\\(\$\{|\r\n?|\n|.)|["']|\$\{|(\r\n?|\n)/gu
->/\\(\${|\r\n?|\n|.)|["']|\${|(\r\n?|\n)/gu
:Incomplete quantifier
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Incomplete Quantifier on Regex in vscode
I am trying to create a regex expression for the beginning of an object so I can replace the block complete with a...
Read more >Incomplete Quantifier On Regex In Vscode
Incomplete pattern matches are implicitly generated for sums of products. with ... Ordinarily, quantifiers are greedy; they cause the regular expression ...
Read more >Quantifiers in Regular Expressions
Ordinarily, quantifiers are greedy. They cause the regular expression engine to match as many occurrences of particular patterns as possible ...
Read more >regex incomplete quantifier Code Example
Answers related to “regex incomplete quantifier” · regex diferent of · regex for erlang online · regExp numero français · regex online converter...
Read more >Quantifiers - JavaScript - MDN Web Docs - Mozilla
If used immediately after any of the quantifiers * , + , ? , or {} , makes the quantifier non-greedy (matching the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
One more minimal reproduction:
/\]/u
->/]/u
:Lone quantifier brackets
@EvgenyOrekhov thanks for the extra example. I won’t appreciate a PR fixing this issue if you’d like to come up with one.