22-03-23 04:47 AM
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.
Answered! Go to Answer.
22-03-23 09:38 AM
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
22-03-23 09:38 AM
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
23-03-23 02:08 AM
Hello Lakshmi
Thank you very much for your kind advice.
Your formula worked out perfectly!
Thanks Again!