A regular expression can be used to match a valid date in the format yyyy-mm-dd from 1900-01-01 to 2099-12-31, with a choice of four separators.
Additionally, a regex can be used to match any traditional date format, including numbers, and any combination of digits for the day and month, and any combination of one or two digits for the year.
See more results on Neeva
Summaries from the best pages on the web
$ matches a date in yyyy-mm-dd format from 1900-01-01 through 2099-12-31, with a choice of four separators. The anchors make sure the entire variable is a date, and not a piece of text containing a date. The year is matched by ( 19 | 20 ) \d \d .
Example: Regular Expression Matching a Valid Date
4.4. Validate Traditional Date Formats - Regular Expressions Cookbook, 2nd Edition [Book]
Date regex | UI Bakery
RegExr: Learn, Build, & Test RegEx