Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regular expression
09-23-2009, 10:18 AM
Post: #1
Regular expression

Hi all...
I m recordng the application flight reservation.i opened the order and i check the date field with text checkpoint.Again i configured the date by [0-1][0-9]\[0-3][0-9]\[0-1][0-9] is this decalring is write. when i run the application it says failed.

please help me out
Visit this user's website Find all posts by this user
Quote this message in a reply
09-23-2009, 11:11 AM
Post: #2
RE: Regular expression
May be the '\' is causing the issue, you should use '/'.
replacing '\' with '/' in your patternn will solve the issue.
if you want you can try this as well
(0[1-9]|1[012])[ /](0[1-9]|[12][0-9]|3[01])[ /]([0-9]{2})

Thanks,
~Saket Kumar
[Linkedin][pdf Api for QTP]
It's so hard when I have to, and so easy when I want to...
Find all posts by this user
Quote this message in a reply
09-23-2009, 04:22 PM
Post: #3
RE: Regular expression
thankz its running...but i dont understand the "(0[1-9]|1[012])[ /](0[1-9]|[12][0-9]|3[01])[ /]([0-9]{2})"
(09-23-2009 11:11 AM)Saket Wrote:  May be the '\' is causing the issue, you should use '/'.
replacing '\' with '/' in your patternn will solve the issue.
if you want you can try this as well
(0[1-9]|1[012])[ /](0[1-9]|[12][0-9]|3[01])[ /]([0-9]{2})
Visit this user's website Find all posts by this user
Quote this message in a reply
09-23-2009, 04:45 PM
Post: #4
RE: Regular expression
(09-23-2009 11:11 AM)Saket Wrote:  May be the '\' is causing the issue, you should use '/'.
replacing '\' with '/' in your patternn will solve the issue.
if you want you can try this as well
(0[1-9]|1[012])[ /](0[1-9]|[12][0-9]|3[01])[ /]([0-9]{2})

Saket -
I maybe wrong, but i believe this post may need to be under QTP Regular Expression ?

Rajesh - Please choose the appropriate category from the next time to better classify the posts.

Basanth
QTP On Unix- Java Way - Without Putty or Terminal Emulation
You have no idea how high I can fly...
Find all posts by this user
Quote this message in a reply
09-23-2009, 04:46 PM (This post was last modified: 09-23-2009 04:50 PM by Saket.)
Post: #5
RE: Regular expression
This is the another pattern for 'mm/dd/yy'. you can create different patterns for your validation.
search this forum, I am sure there are other patterns discussed earlier for date.
You are right Basanth, It was in my mind but somehow I missed to move.
Thanks Buddy.

Thread has been moved!!

Thanks,
~Saket Kumar
[Linkedin][pdf Api for QTP]
It's so hard when I have to, and so easy when I want to...
Find all posts by this user
Quote this message in a reply
09-23-2009, 05:30 PM
Post: #6
RE: Regular expression
Thankz saket...
one more doubt is using the ^. i scrapped some lines in notepad and saved.after that using qtp , i checked with text checkpoint and configured using the regular expression using the ^ab....stiil my output is fail..

Please provide me an good example with web based application and window based application.
Is that ^ only for character or numeric.

Thankz in advance
Visit this user's website Find all posts by this user
Quote this message in a reply
09-23-2009, 05:40 PM
Post: #7
RE: Regular expression
Your query is not clear to me, Would you like to elaborate the query, exactly what do you need to verify using ^.
and for what purpose you need an example.

Please note that if the new query is not relevant with the current thread query, you should open a new thread for new query.

Thanks,
~Saket Kumar
[Linkedin][pdf Api for QTP]
It's so hard when I have to, and so easy when I want to...
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Regular expression for this string falvi 2 238 04-30-2012 11:14 AM
Last Post: falvi
  regular expression rjkmr.aiht 0 146 04-27-2012 11:37 AM
Last Post: rjkmr.aiht
  Regular Expression samverma 3 348 03-31-2012 01:21 AM
Last Post: samverma
  Square Bracket Issue - Regular Expression kapsig431 2 281 03-29-2012 08:38 PM
Last Post: kapsig431
  Regular Expression for time in 24 hour format with out colon Pallavi 3 431 03-13-2012 11:29 AM
Last Post: sshukla12

Forum Jump:


User(s) browsing this thread: 1 Guest(s)