Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How do u write a regular expression for date (dd/mm/yyyy)
field?

Answers were Sorted based on User's Feedback



How do u write a regular expression for date (dd/mm/yyyy) field?..

Answer / amarendra kothuru

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

How do u write a regular expression for date (dd/mm/yyyy) field?..

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

How do u write a regular expression for date (dd/mm/yyyy) field?..

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

How do u write a regular expression for date (dd/mm/yyyy) field?..

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

How do u write a regular expression for date (dd/mm/yyyy) field?..

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

How do u write a regular expression for date (dd/mm/yyyy) field?..

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

How do u write a regular expression for date (dd/mm/yyyy) field?..

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

How do u write a regular expression for date (dd/mm/yyyy) field?..

Answer / gopal

Experts,

I want expression for DD.MM.YYYY !!

Please help !!

Thanks a lot !!

Is This Answer Correct ?    0 Yes 1 No

How do u write a regular expression for date (dd/mm/yyyy) field?..

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 do u write a regular expression for date (dd/mm/yyyy) field?..

Answer / sk

[0-9]+//[0-9]+//[0-9]+
use this buddy...

Is This Answer Correct ?    6 Yes 9 No

Post New Answer

More QTP Interview Questions

Can anyone explain about Keyword driven framework in detail and how to use it in case of any project

4 Answers  


HOW TO AUTOMATE CAPCHA IMAGES while creating Gmail account

2 Answers   TCS,


How to Compare the 2 xl-sheets in QTP? ple write the vb Script for the comparison?

1 Answers  


What are the common defects found in your project? (in qtp interview)

0 Answers   TCS,


How do you configure QTP AND Test director?

0 Answers  


Few basic questions on commonly used Excel VBA functions.

1 Answers  


how to evalute defects in QTP script?

0 Answers  


how to display message with out using msgbox function?

5 Answers   AppLabs,


Can we directly automate testscripts accrdoing to requirements? WHY ?

1 Answers  


What is quicktest professional (qtp)?

0 Answers  


why should we give deliver good quality software?

0 Answers  


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

2 Answers  


Categories