Pick the specific URL from the HTML text such as href link

Hi Guys,

I want to extract the only this below
“a href=”/local_resources/documents/pdf_documents/abstract_book015.pdf"" tag from the textual file, file contains lot many tags and other tagged data.

How can achieve this using regular expressions.

Regular expressions used - ^(?=.\b href\b)(?=.\b.pdf\b).*$
Thanking you in anticipation.

Thanks and regards,
Anand

Hey @anandphisarekar,

Welcome to the UiPath Community !!.

Use Read text file activity which will return you a string with all the data inside it then do a split on that string for href.

for ex:
str is the output string retrieved from the read text file activity.
str.split({“href”},stringsplittoptions.none)(1).replace("=","").ToString()

1 Like

Thanks @amarasto for your quick reply.

Regards,
Anand P