Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use regular expression for this?
#1
Not Solved
Hi
Need help on varabilizing this expression using regular expression:

"20090509WS 238YYCYQR CACARXXFR0149 200905090840200905090953 "

Thanks in advace
Reply
#2
Not Solved
Just to eloborate a bit further on my post:
Code:
Browser("WestJet - Low air fares").Page("WestJet - Low air fares").WebRadioGroup("flightId1").Select "20090505WS   238YYCYQR                            CACARDDXR0119 200905050840200905050953                        "
Browser("WestJet - Low air fares").Page("WestJet - Low air fares").WebRadioGroup("flightId1").Select "20090505WS   188YYCYQR                            CACARGGFR0159 200905051205200905051318                        "
Browser("WestJet - Low air fares").Page("WestJet - Low air fares").WebRadioGroup("flightId1").Select "20090505WS   212YYCYQR                            CACARDDXR0119 200905051645200905051758


It is the last part of the above mentioned scrip for which Reqular Expression needs to be used. ie
Code:
Select "20090505WS   212YYCYQR                            CACARDDXR0119 200905051645200905051758
Reply
#3
Not Solved
Which part is constant in your requirement?

Assuming WS YYCYQR CACARDDXR is constant, the reg exp should take the form:

[date]WS [3digits]YYCQR CACARDDXR[4digits] [date][again n digits]

Check which part in the above exp is constant or can be parametrized, then it should be doable.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Any digit in xpath path using Regular expression Priyam 1 3,270 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,215 04-09-2015, 01:56 AM
Last Post: sarahq49
  Regular expression and script optimisation Padmavathy 1 3,631 03-30-2015, 11:46 AM
Last Post: supputuri
  Regular expression in descriptive programming testernc 1 16,415 12-08-2014, 06:38 PM
Last Post: anshika.agarwal
  need a regular expression. anu05446 0 3,035 11-26-2014, 03:00 PM
Last Post: anu05446

Forum Jump:


Users browsing this thread: 1 Guest(s)