How to extract paragraph in regex

Hello,
How to extract paragraph using regex
I have HTML code like I extract the body of the HTML using get mail Activity but in that, I need to extract the paragraph. The paragraph is Bellow please check
<div dir="ltr"><div>Today am working on the UiPath in that last day am complete chatbot now I just try to update the some feature how we can we work on it you get a clear image how to update and how to write the script of chatbot here we need enterprise addition because of performance will slow in one bot for 1000 user or 10 users it will response first in first out like first in the first responce and we have to build a bot according to the script. so please note you have to know exactly where we use the bot in ChatBot and please this my request if you give the requirement and deadline to show that project on that date only I complete but still they are not asking what you did and I informe Bincy and give all detail of the project trough mail still there no response from anyone.</div><div>Working on the advanced orchestrator.<font color="#888888"><br clear="all"><div><br></div></font></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div >

I need this data on how to extract?

Today am working on the UiPath in that last day am complete chatbot now I just try to update the some feature how we can we work on it you get a clear image how to update and how to write the script of chatbot here we need enterprise addition because of performance will slow in one bot for 1000 user or 10 users it will response first in first out like first in the first responce and we have to build a bot according to the script. so please note you have to know exactly where we use the bot in ChatBot and please this my request if you give the requirement and deadline to show that project on that date only I complete but still they are not asking what you did and I informe Bincy and give all detail of the project trough mail still there no response from anyone.

I hope I will get aresponce

Thanks
Chethan P

Hi,

How about the following expression?

System.Text.RegularExpressions.Regex.Match(yourString,"(?<=\<div\>).*?(?=\<\/div\>)").Value

Regards,

3 Likes

I try this one it was extracting all of that code

Hi,

The above expression returns only first match.
Can you try it in UiPath?

Regards,

1 Like

yaa its working but that is one line mnz its one div if that mail body contains next line how to extract that one please help me i need to extract the body of the mail if the sender give enter in the mail body we cant extract that one

I hope you get my problem and section

Thanks
Chethan P

Hi,

I wrote 2 sample xaml files as the following. (Main.xaml and Sequence.xaml)

Sample20210331-3.zip (4.2 KB)

Hope them helps you.

Regards,

1 Like

Thanks, I get an Idea thanks you so much
I have a dought I try another solution i.e am using outlook mail activity I get the body of the mail proper no need to write regex or use regex simply we give item.body.tostring

my question is why it’s not come in the get impa activity?

Thanks
Chethan P

1 Like

In this sequence is use its working :beer:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.