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
/
JavaScript
/
Regular expressions
Which API returns every match with each match’s named captures and indices?
from Regular expressions
Node 24
intermediate
1 min
Which API returns every match with each match’s named captures and indices?
Spread text.matchAll(/pattern/gd) into an array.
Call text.match(/pattern/gd), which always preserves every capture.
Call /pattern/d.test(text), which returns a detailed result.
Call text.search(/pattern/d), which returns every matching range.
Check
Ask AI about this kata
Report an error
next kata
A search term must be treated as literal text inside a larger Node 24 pattern. What shoul…
Quiz
A new version is available
Reload