cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract a Certain Number from the Path (From table of a webpage)

KazFuji
Level 2

Hello Team.

Currently I am making a process which gets path from a table in a webpage and extract certain number(variable) from the path.
The actual path looks like below...

/HTML/BODY(1)/FORM(1)/DIV(1)/TABLE(1)/TBODY(1)/TR(1)/TD(1)/TABLE(1)/TBODY(1)/TR(1)/TD(1)/TABLE(2)/TBODY(1)/TR(8)/TD(9)

What I want to extract is the Number inside the bracket of the Last TR() .
(In the above example, 8 is the number I want to extract)

I think I can use the calculation stage, but  I was not able to come up with a formula to suit my need.  Can anyone give me an idea how to do it?

Thanks in advance.

1 BEST ANSWER

Best Answers

LakshmiNarayan3
Level 6

Hi Kaz

Use mutli calc stage with syntax first will have "Right(Trim([Path]),20)" store new data item "ShortPath"

in the second row "Mid([ShortPath], InStr([ShortPath], "/TR(")+Len("/TR("), InStr([ShortPath],")/TD")-(InStr([ShortPath], "/TR(")+Len("/TR(")))"

Assuming every time you input the path ending with TD only

Regards

Lakshmi Narayana

View answer in original post

2 REPLIES 2

LakshmiNarayan3
Level 6

Hi Kaz

Use mutli calc stage with syntax first will have "Right(Trim([Path]),20)" store new data item "ShortPath"

in the second row "Mid([ShortPath], InStr([ShortPath], "/TR(")+Len("/TR("), InStr([ShortPath],")/TD")-(InStr([ShortPath], "/TR(")+Len("/TR(")))"

Assuming every time you input the path ending with TD only

Regards

Lakshmi Narayana

KazFuji
Level 2

Hello Lakshmi

Thank you very much for your kind advice.
Your formula worked out perfectly!

Thanks Again!