You need to sign in to do that
Don't have an account?
Nowshad
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.
Thanks
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