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, 5 months ago by Admin.Viewing 1 post (of 1 total)AuthorPosts 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 1 post (of 1 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