Search code examples
salesforcesalesforce-lightningsalesforce-communities

How to search for 18 digit salesforce Id using regex? example : you are invited REF<18 digit SFDC ID> for the interview


i cannot find answer to my question


Solution

  • Salesforce Ids are 15 or 18 characters of Base 62 data. They consist of the characters [A-Za-z0-9].

    So long as your application preserves the case of the Id, the final three characters, which serve as a disambiguator for non-case-safe applications like Excel, can be ignored. Then, you can match REF<Salesforce Id> with the regex

    REF[A-Za-z0-9]{15}