JS ⟩ objects ⟩ built-in ⟩ regex ⟩ capturing group ⟩ named group
// ⭐️ date pattern: yyyy-mm-dd // ╭--- year ---╮ ╭--- month ---╮ ╭--- day ---╮ (⭐️ named groups) let date = /(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})/g;
str.matchAll() ⟩ matchAll() using named groups
Last updated 2 years ago