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

I am having trouble understanding #1 how to paramaterize a userid and password that I need to call in about 25 existing scripts. I need to know how to Create a Reuseable action for 25 existing scripts that will call the exact same userid and password? I need to know how to create a Reuseable action and then have it called by existing scripts being run in a batch.

2 Answers  


How function returns a value?

1 Answers  


what is clean sweep?

0 Answers  


How to handle recovery scenario for a application crash.write script for this.

2 Answers   Polaris, TCS,


What is the basic concept of quicktest professional (qtp)?

0 Answers  






Is it possible to refer the same object for referring more than one object that are of different class using the descriptive programming approach? Suppose my code is 'To create the object named as obj Set obj=Description.Create() 'To define the values obj("title").value="IE" obj("type").value="text" obj("html tag").value="INPUT" 'To set the value Browser("IE").Page("Yahoo").WebEdit(obj).Set "xyz" Can I refer the "obj" object for the three objects like Browser,page and webedit objects? If so how?

0 Answers  


what is framework and types of framework? Need of framework in automation? write folder strucuture of framework.

3 Answers   HealthAsyst,


Explain the concept of how quicktest professional (qtp) identifies object?

0 Answers  


in QTP, we have options like (record and play,recording modes(normal,analog,low level),object identification,smart identification,object repository,synchronizing test,transactions,checkpoints(std,bitmap,text,text area,DB,XML,accessibility),regular expression,actions,data driving,parameter,parameterization,data tables,recovery scenario(pop up,object state,test run error,application crash). real time users of QTP, pls say and when and at what point u have used all these options ,in ur concerned project.pls give me explanation in accordance with ur real time project handled. real users pls send some time in the aboue case. if u can send the the reply through allinterview or at ref_it_ref@yahoo.co.in

1 Answers  


HOW CAN QTP AND TEST DIRECTOR CONNECTED TO THE DATABASE AND WHAT R THE OPTIONS?

0 Answers  


Can any body help me to write descriptive program to find a cell value (say 2 row, 3rd column) in a datatable which is creating dynamically and statically

0 Answers  


What are the challenges u faced in testing with crm domain? How u overcome with?

0 Answers  


Categories