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 3 basic factor on which we determine to perform automation
Explain object spy in qtp.
where do you define the objects as regular expression when u are using regular expressions.
How you test the object which is dynamically changes its location?
without Qtp features can we automated?
what are the different Frame Works in Quick Test Proffessional testing
Can a function return a dictionary object?
What is quick test pro? What is a quick test professional?
i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression
What is Data driven Testing Frame work.Anybody can expain it in Detail.. Pls anybody can give the answer.. Thanks in advance...
How can i check all the button that are enabled in a widnows based application ? What script should i write for this ?
now a days which one is using all companies for qtpscript a)Object Repository based script b)Descriptive program based script c)BOTH