Regular expressions pcre2 · Using regex in tools

Match in JavaScript

Extract the parts of a date with a regular expression literal.

const [, year, month, day] = "2026-10-30".match(/(\d{4})-(\d{2})-(\d{2})/);

Official Regular expressions pcre2 documentation

More using regex in tools commands

All using regex in tools commands · Regular expressions pcre2 cheatsheet

Was this page helpful?