Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need Any digit in xpath path using Regular expression
#1
Below is the string in which I need any digit to be allowed in Table[1] part, since table no. keeps changing. Kindly suggest.
I tried Table[\d], Table[\\d] , Table[?[0-9]], Table[[0-9]+] , however nothing seems to be working. Please suggest


Code:
Browser("name:=PROCESSIT - Powered by ReadSoft - TASK DETAIL").Page("title:=PROCESSIT - Powered by ReadSoft - TASK DETAIL"). WebTable("xpath:=//DIV[@id=""pwAliases::_ccntr""]/DIV[1]/DIV[1]/DIV[2]/DIV[1]/DIV[2]/TABLE[[b]1[/b]]").Highlight
Reply
#2
You need to escape meta characters when using them as literals in regular expressions. In the above example, you need to escape the square brackets. [ ]  --> \[ \] 
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Regular expression to read two words in lowercase, uppercase and with and without spa sarahq49 1 3,803 04-09-2015, 01:56 AM
Last Post: sarahq49
  Regular expression and script optimisation Padmavathy 1 4,394 03-30-2015, 11:46 AM
Last Post: supputuri
  Regular expression in descriptive programming testernc 1 17,092 12-08-2014, 06:38 PM
Last Post: anshika.agarwal
  need a regular expression. anu05446 0 3,455 11-26-2014, 03:00 PM
Last Post: anu05446
Rolleyes Help Required : In Understanding the regular expression arescool 0 3,260 08-15-2013, 08:59 AM
Last Post: arescool

Forum Jump:


Users browsing this thread: 1 Guest(s)