Extract string between two headings only if the text color is black remove other fonts,except black text

Hi Guys,

I want to extract text between 2 headings but i need only the black color text in that…
i am attaching you the screenshot…

image

i have extracted using regexp… Regex.Match(dataText,"(?<=heading1)(.*\n)+(?=heading2)").ToString.Trim.but i need only the text with black color. i dont want that red color
text.

Regards,
Suresh.

@suresh_kumar4,

can you please mention the source of the text, is it from a web or excel or PDF or Word doccument?

You can compare the text color against the System.Drawing.Color.Red if you able to get the color of the text from your source application.

Thanks for your reply @sarathi125 … i am extracting text from PDF with multiple pages…

I am new to uipath can you send me the code for this…
if you send xaml file it will be useful.

Thanks,
Suresh

@suresh_kumar4,

Which activity or method you are using to extract text from PDF? are you using any OCR activity?

Read pdf text…

i am using this expression…

Regex.Match(dataText,"(?<=heading1)(.*\n)+(?=heading2)").ToString.Trim