Get captures and index information from a match.
Section: JavaScript Regex APIs
exec() detailed match
javascript
javascript
/(\d{4})-(\d{2})-(\d{2})/.exec(dateStr)Explanation
Returns an array-like match object or `null`.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing JavaScript Regex APIs