I read this answer on stackoverflow that explained how a Japanese letter on a string could be detected. I tried searching for something similar to string.match() in the String Class documentation but didn't find anything.
I also tried implementing the Best Answer from this post but it didn't work as well, does anyone have a suggestion on how can this be achieved? the output of the code below is false but it should be true.
String message = 'EnglishLetters - みずずほダイレクト';
String regex = '/[\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\uff66-\uff9f]/';
Pattern regexPattern = Pattern.compile(regex);
Matcher regexMatcher = regexPattern.matcher(message);
String replacedMessage;
if(regexMatcher.find()) {
system.debug('true');
}
else{
System.debug('false');
}
//output: false