I have a solution for my question, but I'm trying to get better at regex especially in javascript. I just wanted to bring this to the community to see if I could write this in a better way.
So, I get a datetime string that comes from .net and I need to extract the date from it.
Currently what I have is:
var time = "2009-07-05T00:00:00.0000000-05:00".match(/(^\d{4}).(\d{2}).(\d{2})/i);
As I said, this works, but I was hoping to make it more direct to only grab the Year, month, day in the array. What I get with this is 4 results with the first being YYYY-MM-DD, YYYY, MM, DD.
Essentially I just want the 3 results returned, not so much that this doesn't work (because I can just ignore the first index in the array), but so that I can learn to use regex a bit better.