Micro Focus QTP (UFT) Forums
Regular expression - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Regular Expressions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Regular-Expressions)
+--- Thread: Regular expression (/Thread-Regular-expression--2397)



Regular expression - rajeshdizzy - 09-23-2009

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


RE: Regular expression - Saket - 09-23-2009

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})



RE: Regular expression - rajeshdizzy - 09-23-2009

thankz its running...but i dont understand the "(0[1-9]|1[012])[ /](0[1-9]|[12][0-9]|3[01])[ /]([0-9]{2})"


RE: Regular expression - basanth27 - 09-23-2009

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.


RE: Regular expression - Saket - 09-23-2009

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!!


RE: Regular expression - rajeshdizzy - 09-23-2009

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


RE: Regular expression - Saket - 09-23-2009

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.