Get word between "." and "@"

Hello all,

My goal is to get the first and last name in several E-mail Addresses. (example: feng.steven@gmail.com)

Feng would be the first name, Steven would be the last name.
I got the first name by splitStr, but how can I get the last name?

Please help,
Thanks

Fetch only the name using regular expression and split the name by .

.+?(?=[@])

1 Like
indexofDot  = youremail.IndexOf(".")
indexofA  = youremail.IndexOf("@")
lastname = youremail.SubString(indexofDot + 1, indexofA - indexofDot -1)
2 Likes

It worked! Thanks a lot!

1 Like

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