Hi,
I am new to Uipath. Could anyone please help with this?
I use Request HTTP to get the response body, and it seems a string when I saved it as a variable.
I am trying to extract the address from the string, but I am not good at this.
For example, here below is what I want to get:
38, AVENUE JOHN F. KENNEDY L-1855 LUXEMBOURG
(The address can be different every time, but the page structure is always same.)
Here below is part of the html body string:
"…
Date when request received
2021/02/02 20:51:47
<tr>
<td class="labelStyle">Name</td>
<td>AMAZON EU SARL
</tr>
<tr>
<td class="labelStyle">Address</td>
<td>38, AVENUE JOHN F. KENNEDY<br />L-1855 LUXEMBOURG
Wow. It works. Thanks so much for the explanation and xaml file!
Also thanks for the post link for Regular expressions, I will keep learning.
Have a good night!
@MiaS - Since it’s very complex to ignore the <br /> in the middle. What I did was, extracted text between td tags and simply replaced the output with spaces for <br />.
Here is the updated xaml and the outputs: Regex_Mia.zip (35.5 KB)
Hi again,
The solution you provided works very well when I tested one by one.
BUT when I put this regex in the loop, this only works for the address example 1.
No matter what sequence I put this 3 cases, it keeps jumping this error for the address example 2 & address example 3:
" Object reference not set to an instance of an object)"
Hi @prasath17
It’s all set for this task. Your solution is totally fine. I made a mistake, I didn’t realise the match regular expression was changed too in your 2nd solution. I only changed the group function (from first solution you provided) into replace function(the 2nd solution you provided), that’s why the output is empty.
Thanks so much for your help.
@MiaS - Oh yes, I was trying hard to put an OR condition to ignore the br tag but it was not working so I changed my Initial solution. Sorry I thought you will notice since I gave the xaml.