Does anyone have any ideas on how and how to create a regular expression to match a date in any given period?
Two examples:
23/11/2008 - 12/04/2010 //The expression would evaluate whether 16/04/2010 was in this range, and return false. //The expression would determine whether 03/12/2009 was in this range, and return true.
and
01/09/1984 - 30/04/2001 //The expression would evaluate whether 16/04/1990 was in this range, and return true. //The expression would determine whether 03/12/2009 was in this range, and return false.
I racked my brains over how to come up with something, but I have nothing that is close. Examples on the Internet are only interested in checking if the date is in a specific format, but nothing about checking ranges.
The reason I noted C # in this is because it is not possible to do this in direct regex, and a range regex must be created manually for each individual case.
source share