I\'m looking for a regex string that will validate dates formatted as yyyyMMdd (no delimiters) and works for leap years. The closest thing I found so far only validates dat
I thing using regex for this is almost impossible, due to the complex calculation required for leap years. Jon Skeet is right: use new SimpleDateFormat("yyyyMMdd") for this.