🔰named group

JSobjectsbuilt-inregexcapturing 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;

Last updated