Regex to find Email address from a text file with multiple emails address

Hello,

I am looking to create a Regex to find this email address from the below text.

From: “Fan, Fan” <Fan.Fan@wzt-onlirewwewr.com>
Date: Tue, 16 Jul 2024 16:09:45 +0200
Subject: dhdjfjghkhjljkh
Message-Id: <htzkloö>
Receiver: “Fan, resb” gdhf.Fan@gfhjgj.com

I need to get the email address stated in the “From” line.

Hi @parnalmahavir.patni

Try this

(?<=From.*\<).*(?=\>)

Regards,

@parnalmahavir.patni

System.Text.RegularExpressions.Regex.Match(Input,"(?<=From.*\<).*(?=\>)").Value

Regards,

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