Parsing Dates
Explore how we can parse dates and create Date objects by using regular expressions.
We'll cover the following...
Problem statement
For the third exercise, let’s try to do something more practical. As the title suggests, you can easily use regular expressions to parse dates, which means you can grab a string that represents a date and turn it into the correct Date
object.
Of course, there are a variety of libraries published out there that actually deal with this in all the right ways, but, because we’re trying to understand the power of RegExps, we’ll just ignore that fact for the time ...