String Manipulation - to get a subset of a string

Hi All,

I have an email body like below :

"Address will be informed later.

First Name : John
Last Name : Doe
Email id : JohnDoe@xyz.com

Should you respod to this email, do it immediately."

I need to manipulate the string holding the above string value in such a way that, I get the output as :
First Name : John
Last Name : Doe
Email id : JohnDoe@xyz.com

Any help will be beneficial in its regards. Thankyou

Hi,

How about the following?

firstname= System.Text.RegularExpressions.Regex.Match(yourString,"First Name.*").Value
lastname = System.Text.RegularExpressions.Regex.Match(yourString,"Last Name.*").Value
emailid = System.Text.RegularExpressions.Regex.Match(yourString,"Email id.*").Value

Sample20230205-5L.zip (2.3 KB)

Regards,

Thanks @Yoichi .
It was of great help.

1 Like

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