How to get only the email address in each cell containing other characters?

Hi, just want to ask on how to get just the email address on this column?
Thanks!

use regex

system.Text.RegularExpressions.Regex.Match(inputText, "<(.*?)>").groups(1).Value

where inputText is the input string

e.g. if inputText = “Diana diana@gmail.com
then this code
system.Text.RegularExpressions.Regex.Match(inputText, "<(.*?)>").groups(1).Value

will give you “diana@gmail.com

1 Like

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