how can I extract substring from email id only gmail string in asp.net
Strings how can i extract substring
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Piyush PansuriyaRank #454 · 5.5K reputationPosted Aug 9, 2017, 11:58 PM EDT
Hello,
You can use like this :
string str = null;
str = "[email protected]";
if (str.Contains("@gmail.com") == true)
{
MessageBox.Show("The string has gmail");
}
else
{
MessageBox.Show("The String has not gmail");
}