write the regular expression for date format of mm/dd/yy?

Answers were Sorted based on User's Feedback



write the regular expression for date format of mm/dd/yy?..

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

write the regular expression for date format of mm/dd/yy?..

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

write the regular expression for date format of mm/dd/yy?..

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

write the regular expression for date format of mm/dd/yy?..

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

write the regular expression for date format of mm/dd/yy?..

Answer / pratap

[0-1][0-9]/[0-3][0-9]/[0-2][0-9][0-9][0-9]

Is This Answer Correct ?    3 Yes 3 No

write the regular expression for date format of mm/dd/yy?..

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

write the regular expression for date format of mm/dd/yy?..

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

write the regular expression for date format of mm/dd/yy?..

Answer / pavani prasad

Thanks ranu & pratap.

But given regular expressions are accepting the invalid
date like 19/39/2000

Is This Answer Correct ?    0 Yes 2 No

write the regular expression for date format of mm/dd/yy?..

Answer / pavani prasad

Thanks Rajesh

Is This Answer Correct ?    1 Yes 3 No

write the regular expression for date format of mm/dd/yy?..

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

Post New Answer

More QTP Interview Questions

Ex : some mail name with surname Email id's there that is string fetch the particular surname only how to get particular surname all emails

1 Answers   Infosys,


HI ALL, HOW WE INSTALL .NET ADD-IN OR JAVA ADD-IN TO THE QTP? PLZ URGENT.ANSWER ME.

2 Answers  


How can we import a Open Office excel file in QTP

4 Answers  


Have you worked with QC?

1 Answers   Satyam,


what is Automation frame work and how do u used this for your project?

3 Answers  






hi friends i have 4 yrs exp in testing and 2 yrsexp in QTP.currently aim working in mnc in north as a permanent employer .iam looking for job in south is there any openings plz let me know my mail id is bjr@aol.in its very urjent

5 Answers  


Explain how Selenium is different from UFT?

0 Answers  


Can we directly start working with QTP without any knowledge on WinRunner? (After getting trsining on QTP)

1 Answers  


explain qtp framework by taking an example?

3 Answers  


When u ll use Record Button in QTP?Is VB script is Mandatory in QTP? What is Meaning of Frame("v1")?

1 Answers   TCS,


Plz give the vb script for the following scenerio I have faced one issues while doing test in QTP. I have described the scenario below. 1. I have to test web application.In that i want to select from the drop down values in the application. 2. Suppose Drop down has 5 value "A,B,C,D,E".I would like to give value from data table of QTP. 3. For every iliteration it should select A,then B and so on

0 Answers  


Please Explain The QTP real Testing process with steps.

4 Answers  


Categories