ReGex- URL problem

I have to automate process that has to click link inside email body.
Below is example

Poštovani/a izvještaj se nalazi na file://///SRVTESTDEV/Public/GLAVNA/TOTALI/20230518/0840184001421216/001.CSV]>
> Molimo Vas da tabele snimite lokalno kod sebe jer će iste biti obrisane u roku tjedan dana. Hvala.

Ovo je automatska poruka i molimo Vas da na istu ne odgovarate.

Can you help me with regeex for this situation?
I’ve used this one

file://///[A-Z]/[A-Z][a-z]/[A-Z]/[A-Z][0-9]/[0-9]/[0-9]/[0-9].[A-Z]

and the result was

System.Linq.Enumerable+d__97`1[System.Text.RegularExpressions.Match]

What should I do to get proper result?

You’re almost there. The variable that contains the regex output is an enumerable (e.g. in case there were multiple matches to the pattern). If you would like to just get the value of the first match, you can just enter YourOutputVar(0).Value

@dvojinovic

You can get the email body as html and save it as a .html file

and then using use application/browser activity anf open the html page in browser …where a click activity can be used and click on the link or use get attribute to get the file path and use further

another way is to use extract the text require from body to get the link

and use it in read csv activity

Pathvalue = System.Text.RegularExpressions.Regex.Match(BodyVar,"(?<=file:///).*(?=]>)").value

Hope this helps

cheers

clicking the Link would have the result to fetch / grab the stored csv. Maybe calculating the filepath (removing ecaped slashes) and working with the filesystem activities) will be an alternate

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.