Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't we directly compare against regexp
#1
Not Solved
if "Document 12456 was posted" = "Document \d+ was posted" Then   Print "Yes"else    print "No"end ifthe above code shows No, can't we directly compare against regexp??? I know how to match using RegExp Object, but isn't the direct comparison possible??is there any property we need to set as True??I'm using UFT11.5.
Reply
#2
Not Solved
Regular expression is not used for comparison rather it is used to identify objects of similar patter.

Why I am not allowing to post any reply?
Reply
#3
Not Solved
anu05446:

Anshoo Arora, in Relevant Codes, demonstrates how to use regular expressions for select method for a listbox.
http://relevantcodes.com/regular-express...d-listbox/
You might be able to modify his code to what you need.

He has another nice article at http://relevantcodes.com/qtp-all-about-t...on-create/

hth,

Parke
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  RegExp in RepParam mv8167 1 2,768 11-04-2011, 07:13 PM
Last Post: Ankesh
At Please help on a RegExp issue cuit3016 2 2,852 02-13-2011, 06:04 AM
Last Post: markQA

Forum Jump:


Users browsing this thread: 1 Guest(s)