function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anas AlamourAnas Alamour 

Retrieve all names which are not alpha

We have custom object contains frist name and last names as custom fields. We have a requirment to retrieve all the records where the first name or last name conatins non- english alphapitcal char ( digit, special charcter , non-english char ,..etc) , is that possible with query in SOQL or Apex. Please help. 

Thanks. 
Sai PraveenSai Praveen (Salesforce Developers) 
Hi Anas,

It may not be directly possible to achieve it.  But you can create a formula field of type checkbox and make that to true by using REGEX function.

You can use this formula field in SOQL and query based on it.

If this solution helps, Please mark it as best answer.

Thanks,