Multiline flag in regex
const str = ` 1. Bread 2. Apples 3. Milk `;  const regex = /^\d\./gm; console.log(str.match()); // [...
Tags: regex, regularexpression, beginners, webdev