I have several folders with the following structure (the last part of the folder is also the e-mail address: C:\XYZ\2020\January\firstname.lastname@example.org
I loop trough the folders, and if certain conditions apply in documents in this folder then I need to send an e-mail. Therefore I need to extract the last part of the folder (beginning from the last backslash “” until the rest of the right of the String) to use this part as the email-address.
How would the substring or RegEx look like? I need the following result in this example: email@example.com
Unfortunately I am not that familiar with the syntax.