Get text after a certain word


I have a process where I get mails and I need to extract the delivery date written in the mail. I tried to build my own expression but I wasnt successful. And the trick is sometimes the anchor will be “Delivery Date:” and sometimes “Liefer datum:”

The format is:

… … .
… . . . . … … … .
Delivery Date: 15.15.2020 … (or Liefer Datum: 15.15.2020)

I need to assign 15.15.2020 to a certain value.

mailDate = System.Text.RegularExpressions.RegEx.Match(mailbody, ).Value ,
(probably this is the vay but I dont have the regex.

Thank you inadvance

1 Like


Check out this Regex pattern:
(?<=Delivery Date: |Liefer Datum: )\d+.\d+.20\d+

Regex101 Preview here

If you want to learn more about Regex - check out my Regex MegaPost

Hopefully this helps :blush:


Its working thank you very much. Sorry for the delay response

1 Like

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