write the regular expression for date format of mm/dd/yy?
Answers were Sorted based on User's Feedback
Answer / rajesh
[1-9]|1[0-2]/[1-9]|[1-2][0-9]|3[0-1]/19[0-9][0-9]|2[0-9][0-9][0-9]
More food for thought valid from 1900 to 2999.
Is This Answer Correct ? | 13 Yes | 0 No |
Answer / rajesh
Pavani your point is correct
Here is the format for the input.
MM will be 1 to 12 "[1-9]|1[0-2]"
DD will be 1 to 31 "[1-9]|[1-2][0-9]|3[0-1]"
YY will be "[0-9][0-9]"
Hence MM/DD/YYYY will be
"[1-9]|1[0-2]/[1-9]|[1-2][0-9]|3[0-1]/[0-9][0-9]"
Is This Answer Correct ? | 10 Yes | 5 No |
Answer / hetal
Regular experession can also be written in qtp as follow:
(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / falak
^(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d$
Is This Answer Correct ? | 3 Yes | 2 No |
Answer / lak
^([1-9]|0[1-9]|1[0-2])[- / .]([1-9]|0[1-9]|1[0-9]|2[0-9]|3
[0-1])[- / .](1[9][0-9][0-9]|2[0][0-9][0-9])$
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sai shankar
(0[1-9]|1[0-2])[./-](0[1-9]|1[0-9]|2[0-9]|[a-z])[./-]([0-9]{4})
Is This Answer Correct ? | 0 Yes | 0 No |
Thanks ranu & pratap.
But given regular expressions are accepting the invalid
date like 19/39/2000
Is This Answer Correct ? | 0 Yes | 2 No |
Answer / ranu rathore
[0-1][0-2]/[0-3][0-9]/[0-2][0-9][0-9][0-9]
Is This Answer Correct ? | 3 Yes | 6 No |
What r the different type of reports generated in Quality Center?
how do i know how to use tools
What is the difference between run time object and test object?
Hi All, I need Code For how to export Pass\Fail status to excell sheet without using QC. Thanks Balaji
In QTP, If you have list of checkboxes, how can i select a particular checkbox and delete if the checkboxes are changing dynamically?
Using Regular expression in Date format DD/MM/YYYY (0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[12])/([0-9]{4}) in this regular expression year 0000 also accepted.I need atleast any one single digit must be nonzero value (like 0009,1000,0034)
What criteria do you use when determining when to automate a test or leave it manual?
how to re-install QTP 9.0 trial version.
how to post xml data from QTP scripts to any application?
What r the features of QTP9.2,other than QTP8.0 What r the extre features of QTP9.2.
How do client side image and server side image work?
How the exception handling can be done using quicktest professional (qtp)?