Google Drive link in email

studio

#1

Hi there,
I need a robot that can read body of an email and paste it to a browser address bar.

When robot reads body (just google-drive file link) of an e-mail (with mailMessage.Body), for example:
https://drive.google.com/file/d/0ByrYUBs1IH35V2pCeHVDMkx6TnNFYVBFd21jX1NMV1FrRXZn/view

Robot (or browser) converts it to as follows:

<div dir="ltr"><div><div class="gmail_signature"><div dir="ltr"><div><a href="https://drive.google.com/file/d/0ByrYUBs1IH35V2pCeHVDMkx6TnNFYVBFd21jX1NMV1FrRXZn/view">
https://drive.google.com/file/d/0ByrYUBs1IH35V2pCeHVDMkx6TnNFYVBFd21jX1NMV1FrRXZn/view
</a><br></div></div></div></div> </div>

I tried a trim pattern for link in email.Body. But it cannot solve my problem.
Matches
Input: mailMessage.Body.trim
Pattern: “\S*(http|https)\S*”
Regex Option: IgnoreCase, Compiled
Result: MatchFound

Assign
file_link=MatchFound(0).tostring

Thanks in advance


#2

I found a way to convert string variable (file_link) value.

file_link (string variable) 's value was:
<div dir="ltr"><div><div class="gmail_signature"><div dir="ltr"><div><a href="https://drive.google.com/file/d/0ByrYUBs1IH35V2pCeHVDMkx6TnNFYVBFd21jX1NMV1FrRXZn/view">
https://drive.google.com/file/d/0ByrYUBs1IH35V2pCeHVDMkx6TnNFYVBFd21jX1NMV1FrRXZn/view
</a><br></div></div></div></div> </div>

Assign
file_link=file_link.Replace(“href=”,"&")

Assign
file_link=file_link.Replace(">https","&")

Assign
array_link=file_link.toString.Split({"&"c}, StringSplitOptions.RemoveEmptyEntries)

Assign
file_link=array_link(1)

Assign
file_link=file_link.Replace("""","")