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 |
Can anyone explain about Keyword driven framework in detail and how to use it in case of any project
HOW TO AUTOMATE CAPCHA IMAGES while creating Gmail account
How to Compare the 2 xl-sheets in QTP? ple write the vb Script for the comparison?
What are the common defects found in your project? (in qtp interview)
How do you configure QTP AND Test director?
Few basic questions on commonly used Excel VBA functions.
how to evalute defects in QTP script?
how to display message with out using msgbox function?
Can we directly automate testscripts accrdoing to requirements? WHY ?
What is quicktest professional (qtp)?
why should we give deliver good quality software?
I want to open a text file and then search some specified text in it and then replace that text with some other text i found that text in .txt but do not know how to replace that text can any body help me. if possible put the code for qtp