How to get a dynamic Links in Mail Body content?

Hi @keerthi_arumugam ,

So, In this Case, Do you want to extract the links from the First 3 rows as the 3 rows are Having Capital Account Statements and Download ?

1 Like

yes I think

do you have any solution for that?

Hi @keerthi_arumugam ,

Could You try to use the Regex Expression below :

(?<=Capital Account Statements)(\n*\s)*</td>(\n*\s)*<td.*\n*<a\s*href=\""(.*?)(?=\"")

You Could follow the below Steps :

  1. Use Matches Activity, Pass the Pattern as mentioned above. Input would be your Email Body String.

  2. Create an Output variable, say matchings.

  3. Next, we can use this Output to get the links list and convert it to an Array of String.
    Using an Assign Activity we can do the following :

linksArray = matchings.Cast(Of Match).Select(Function(x)x.Groups(3).ToString).ToArray

where linksArray is a variable of Type String Array

Visual of the Extraction in Debug :

Let us know if the steps doesn’t work or if you face any difficulties.

1 Like

Matching(0) is the o/p solution for 1st link right?
Group(3) what it means?

@keerthi_arumugam ,


According to the Input Data, and the Output Expected for the Pattern to match, we have 3 Matches.

The Matched outputs are stored in matchings variable, which we can access using indices 0, 1, 2…

It is How we have compose the Pattern, the Data needed to be Extracted is closed within the 3rd Group

To access the Groups we use .Groups on the Matches activity output. Here again we access the Group Number required.

However, Do we have the Expected Output as you Required?

I suggested the Array of String Output approach, so that we’ll have all the links required as an Array.

Is this been Checked?

1 Like

Hey , did you get the solution for this ? I have same query and not able to get it.