Regex for dropbox link

Hi,

I want to extract dropbox link from email body.

i have tried using

\w+[+,.]?\w+[+,.]?\w+@\w+.\w+?\w+.?\w+

\S*(http|https)\S*

.dropbox.com/s/

\S*(.dropbox.com/s/)\S

http[s]?://www(?:(?!http[s]?://)[a-zA-Z]|[0-9]|[$-_@.&+/?=]|[!*(),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+

but none of the above are capturing the link.

Please help me to create the expression for drop box link.

Regards,
Heena

1 Like

Please provide sample links

Hi,

sample links

Exmple 1 

https://www.dropbox.com/s/sy4ij90p7jkher2/SIGNED_TEAM_StandIn_LLP_20001.pdf?dl=0

Example 2 https://www.dropbox.com/s/y18apkdh9q8g70t/SIGNED_TEAM_BG%20Extras_LLP_20001.pdf?dl=0

and
image

Hi @heena_shaikh

Try This Regex,

([–:\w?@%&+~#=]*.[a-z]{2,4}/{0,2})((?:?&=(?:\w+))+|[–:\w?@%&+~#=]+)?

Hope it works !! :slight_smile:

@Krishna_547

It is not accepting the pattern.

image

1 Like

@heena_shaikh

Use assign activity as shown below ,

1 Like

@Krishna_547 Please help me to know what mistake i am doing.

Followed your steps
but still getting error

ClickOnHyperlinkOutlookMail.xaml (15.5 KB)

Regards,
Heena

Change the assign statement to below and try ,

@Krishna_547

No dear it’s not working.

Send body of the mailmessage

Hi,

we have mainly these three types. of dropbox link

Type 1

here is a link to the pdf payroll submission form for our iRobot shoot in December.
I have the line producer Damon on the email thread if there are any questions etc.

https://wdrv.it/f36fdd89d/feed

Type 2

1 Stand In:
Type
https://www.dropbox.com/s/sy4ij90p7jkher2/SIGNED_TEAM_StandIn_LLP_20001.pdf?dl=0

50 Extras:

https://www.dropbox.com/s/y18apkdh9q8g70t/SIGNED_TEAM_BG%20Extras_LLP_20001.pdf?dl=0

Let me know if the links work and if you have any questions!!

Type 3;

Here is our full payroll scan for Thousand Foot Squid’s Kia 2001-01 job!
It’s large so I made a special Dropbox Link for you.

Regards,
Heena

1 Like

Try This

New folder.zip (12.7 KB)

1 Like

@Krishna_547,

Thanks Buddy it’s almost the solution.But it is capturing only the first dropbox link it come across, if there are 2 link it captures only the first one.

WHAT MODIFICATION I CAN DO FOR IT TO READ ALL DROPBOX LINK IN SINGLE MAIL

REGARDS,
HEEENA

OUTPUT

image

Check this … StringReg will be an array of all matches … You can loop through that array list

New folder.zip (12.7 KB)

Now it is capturing the first link it come across rest it leaves

output

image

That is because of the write line… Use one more loop to loop through all elements of stringReg

As you can see it is not one link , they are two concatenated to one because of ,
StringReg(0).ToString + StringReg(1).ToString,

so use for each string of stringReg , and then print each one

@Krishna_547 Thanks buddy for all your patience and efforts.

Output:

How can i limit to only dropbox link

image

I have done looping as you said