Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
CS foundations
/
Regular expressions
Which approach explicitly requires an order-reference match to consume the entire JavaScr…
from Regular expressions
Node 24
beginner
4 min
Which approach explicitly requires an order-reference match to consume the entire JavaScript string?
Test `/[A-Z]{2}-\d{6}/u` and accept any successful substring.
Test `/^[A-Z]{2}-\d{6}$/u` and assume `$` means only absolute end.
Execute `/^[A-Z]{2}-\d{6}/u`, then require `match[0].length === input.length`.
Add the `g` flag and call `test()` twice.
Check
Ask AI about this kata
Report an error
next kata
What does this global search print?
Predict the output
A new version is available
Reload