JSFiddle - React, Tailwind, and code Playground
JavaScript
var text = "Todays date is 01-dec-2020 but tomorrow is another day";
var dates = text.match(/\d{2}-(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)-\d{4}/gi);
console.log(text);
console.log(dates);