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

Need help to check String contains latic characters

Dear All,


 Can you please help me to check the String contains latic characters in Apex code. Please respond to me..if anybody have the code or solution.






it should done by regex try this


pattern myPattern = pattern.compile('\\w+');

matcher myMatcher = myPattern.matcher(your string varaiable or value);

if (!MyMatcher.matches()) {
// invalid, do something


Thanks a lot Kiran

I tried as below, with search Jey with latin :-��֯��չ��

Pattern myPattern = pattern.compile('\\w+');
system.debug('searchKey'+searchKey); //��֯��չ��
Matcher myMatcher = myPattern.matcher(searchKey);
   system.debug('Latin Not match'+MyMatcher.matches()); // false should be true
if (MyMatcher.matches()) {
   system.debug('Latin match'+MyMatcher.matches());


Please tell me it should return True i see false