Regular Expression
-
Dear All, I need a Regular Expression to validate a date in yyyy-mm-dd at Server Side. Any help will be greatly appreciated. Thanks in advance:rose:. Regards, Kasi
-
Dear All, I need a Regular Expression to validate a date in yyyy-mm-dd at Server Side. Any help will be greatly appreciated. Thanks in advance:rose:. Regards, Kasi
The program Expresso is great for learning/testing regex, it's easy to find with google. In this case, it's just \d{4}-\d{2}-\d{2} assuming you want to force the format you showed ( i.e. not accepting 2007-12-2 or 2007-2-12 ) If you want to accept those values, it's \d{4}-\d{1,2}-\d{1,2}
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
The program Expresso is great for learning/testing regex, it's easy to find with google. In this case, it's just \d{4}-\d{2}-\d{2} assuming you want to force the format you showed ( i.e. not accepting 2007-12-2 or 2007-2-12 ) If you want to accept those values, it's \d{4}-\d{1,2}-\d{1,2}
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
Your help is appreciated.:rose: Always :), Kasi