Hi
I want to extract right most characters.
If Mobile No is - + 919812587890 . I want 9812587890
Thanks
Hi
I want to extract right most characters.
If Mobile No is - + 919812587890 . I want 9812587890
Thanks
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
Jignesh KumarRank #91 · 22.9K reputationPosted Apr 8, 2023, 11:48 AM EDT
Hello,
try this one,
string mobileNo = "+ 919812587890"; string rightmost10 = mobileNo.Substring(str.Length - 10); Console.WriteLine(rightmost10);Amit MohantyRank #112 · 20K reputationPosted Apr 9, 2023, 3:28 AM EDT
string mobileNo = "+919812587890"; string lastTenDigits = mobileNo.Substring(mobileNo.Length - 10); Console.WriteLine(lastTenDigits); // output: 9812587890