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 :

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 :

Any help will be beneficial in its regards. Thankyou


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 (2.3 KB)


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.