Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regular expression
#1
Not Solved
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
Reply
#2
Not Solved
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
Code:
(0[1-9]|1[012])[ /](0[1-9]|[12][0-9]|3[01])[ /]([0-9]{2})

Reply
#3
Not Solved
thankz its running...but i dont understand the "(0[1-9]|1[012])[ /](0[1-9]|[12][0-9]|3[01])[ /]([0-9]{2})"
Reply
#4
Not Solved
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
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#5
Not Solved
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!!

Reply
#6
Not Solved
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
Reply
#7
Not Solved
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.

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Any digit in xpath path using Regular expression Priyam 1 3,497 10-05-2016, 11:05 AM
Last Post: Ankur
  Regular expression to read two words in lowercase, uppercase and with and without spa sarahq49 1 3,361 04-09-2015, 01:56 AM
Last Post: sarahq49
  Regular expression and script optimisation Padmavathy 1 3,832 03-30-2015, 11:46 AM
Last Post: supputuri
  Regular expression in descriptive programming testernc 1 16,582 12-08-2014, 06:38 PM
Last Post: anshika.agarwal
  need a regular expression. anu05446 0 3,124 11-26-2014, 03:00 PM
Last Post: anu05446

Forum Jump:


Users browsing this thread: 1 Guest(s)