Get text file location from body


I receive email with this type of “link” in body (an example):


and other text. How do I extract it so I can follow the “link”?

Hi Markosc,
I think Regex would be your friend here :slight_smile: Are you familiar with it?

In you case the Regex could be something like this (from

Or you could loop through the lines of the text one by one, and see which one starts with “file”. It depends on how the e-mail body is formatted, and if it will always be the same.

And here is the regex that will match UNC from received e-mail:


Source: c# - Regex to validate a Windows UNC path - Stack Overflow


1 Like

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