How do u write a regular expression for date (dd/mm/yyyy)
field?
Answers were Sorted based on User's Feedback
The above regular expression(Ans:1) will fail as it allows
day between 31 to 40 as well.
The following regular expression takes care of all cases
and validate the format (dd/mm/yyyy)
(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[012])/\d{4}
Is This Answer Correct ? | 22 Yes | 15 No |
Answer / kirti
(0[1-9]|[12][0-9]|3[01])[//](0[1-9]|1[012])[//]([0-9]{4})
Is This Answer Correct ? | 7 Yes | 5 No |
Answer / krishna
This is the corect answer:
[0][1-9]|[1-2][0-9]|[3][0-1][//] ([0][1-9]|[1][0-2])
[0-9]{4}
Is This Answer Correct ? | 6 Yes | 4 No |
Answer / satish yadav
To write regular expression for dd/mm/yyyy format
[0-3][0-9][/](([0][0-9])|([1][0-2]))[/][0-9]{4}
Is This Answer Correct ? | 20 Yes | 20 No |
Answer / naresh
([0-2][1-9]|[3][0-1])|([0][1-9]|[1][1-2])|[0-9][0-9][0-9][0-9]
Tjis is the perfedct regular expression for the date.. guys...
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / megh
Regex Birthdate = new Regex(@"((0[1-9]{1})|([1-2]{1}[0-9]{1})|(3[0-1]{1}))[-/]{1}((0[0-9]{1})|(1[0-2]{1}))[-/]{1}[0-9]{4}");
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / laxman
(0[1-9]|1[0-9])|2([0-9]|3[0-1])/(0[1-9]|1[0-2])/([0-9]|[0-9]|[0-9]|[0-9])
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / gopal
Experts,
I want expression for DD.MM.YYYY !!
Please help !!
Thanks a lot !!
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / megh
Regex Birthdate = new Regex(@"((0[1-9]{1})|([1-2]{1}[0-9]{1})|(3[0-1]{1}))[-/]{1}((0[0-9]{1})|(1[0-2]{1}))[-/]{1}[0-9]{4}");
Is This Answer Correct ? | 0 Yes | 1 No |
How will you handle the situation when object is not captured during record?
What is the dis advantage of check points in QTP, if any?
Can anyone help.i need total excelsheet operations,shortcuts in testing environment from starting onwards....
what is Compile Module in QTP? what exactly it contains Functions or Actions?
How QTP recognizes Objects in AUT?
How to enter table check points?
How to find the name of the machine where you are running your automation scripts in qtp?
Hi guys, Please suggest some thing these points are correct???, Is UFT 12 and QTP outdated ??? and also VBscript is also deleted/Removed from QTP ???? Javascript is added latest and tool name is called JFT ??? From this year ??
How to write test cases for web applications using QTP.plz write a sample test case to show how to write.urgently needed.thanks in advance..
If there are some browsers opened and I don't how many browsers are open, Now I want to close all the browsers that I don't know how many are opened. What would be Descriptive programming for this in QTP using VB Script..??? Please send your answers.
How would you parameterize the text field "Country" and the same "country" when it appears as combo field on other page with text field city and same with City combo field?
I have java based application on my computer. Can I install QTP on it? What are system requirements for installing QTP?