I don\'t know much about regular expressions, but I got a string (url) and I\'d like to extract the date from it:
var myurl = \"https://example.com/display
Depending on how the URL can change, you can use something like:
\/\d{4}\/\d{2}\/\d{2}\/
The above will extract /2010/07/06/ (the two slashes just to be safer - you can remove the heading and trailing \/ to get just 2010/07/06, but you might have issues if URL contains other parts that may match).
See the online regexp example here:
Here's the jsfiddle:
To format it, take a look e.g. here:
Something along these lines (note you need the function from above):
var dt = new Date(2010, 6, 6);
dateFormat(dt, "dS of mmmm, yyyy");
// 6th of June, 2010