RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Current Date For Form Field - mm/dd/yy
Expression
^(0[7-9]|1[012])[/](0[1-9]|[12][0-9]|3[01])[/](19)$
Description
I needed an expression that would capture the current date and at least future dates. Since I needed users to be honest and to pick the present, I adjusted the expression to only read for the following months of the year and the year 2019 specifically. It's not foolproof or particularly sophisticated, but it is easy to read and edit. The input follows: mm/dd/yy.
Matches
07/01/19 | 09/21/19 | 08/31/19
Non-Matches
02/01/19 | 13/52/65 | 06/30/19
Author Rating: Not yet rated. Joanne
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials