How to get last 10 numbers from a String using Apex in Salesforce ?Latest Posts › Forums › Superbadges Help and Discussions › How to get last 10 numbers from a String using Apex in Salesforce ?Tagged: #phone #mobile #stringThis topic has 1 reply, 1 voice, and was last updated 3 years ago by Admin.Viewing 2 posts - 1 through 2 (of 2 total)AuthorPosts 10 December 2021 at 6:36 am #1437 Reply AdminKeymasterHow to get last 10 numbers from a String using Apex in Salesforce to get a valid ten digit number and also add +91? 10 December 2021 at 6:36 am #1438 Reply AdminKeymasterWe can use right(n) command to get last n digits from a String using Apex.Syntax: str.right(n);Example: String strphoneNumber = ‘917718838553’; string phnumber = strphoneNumber.right(10); string phonewithCode = ’91’+strphoneNumber.right(10);AuthorPostsViewing 2 posts - 1 through 2 (of 2 total)Reply To: How to get last 10 numbers from a String using Apex in Salesforce ?Your information: Name (required): Mail (will not be published) (required): Website: Submit