如何使用PHP语言检测字符串上的日文字符? [关闭]


Given the following 3 strings,

String 1 (Japanese with other language words):
"激安価格お買い得タイヨー脱腸帯·片側用 fm 腰回り with any other word"

String 2 (Portuguese):
"isto é um teste."

String 3 (English):
"This is a test"

How can I only identify the String 1 using PHP?

Thks in advance.

EDIT:
Since this topic is on hold, I'm gonna try to meet stackoverflow's requirements:

"This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself." – Anonymous, jeroen, Hanky 웃 Panky

I have a problem... :(
My problem is that I am receiving lots of Spam messages on a reviews system website. I've noticed that most of them has japanese characters. My bosses said specifically that I can't use any captcha mechanism.

So.... The only thing I can think of is detect japanese characters... like I've mentioned on the title, and described on the post!

Better?
Cheers! :)

http://ideone.com/s8Mzum

I tried this on Ideone, works but isn't throughly tested though.

   <?php

$word = "激安価格お買い得タイヨー脱腸帯·片側用 fm 腰回り";
$word2 = "This is the english language";

function isJapanese($lang) {
    return preg_match('/[\x{4E00}-\x{9FBF}\x{3040}-\x{309F}\x{30A0}-\x{30FF}]/u', $lang);
}

var_dump(isJapanese($word)); //returns 1
var_dump(isJapanese($word2));//returns 0