Could you have a look at the following php
prototype codes for matching and extracting only Chinese characters? Let me know if it works for you as expected.
$ more test.php test2.php
::::::::::::::
test.php
::::::::::::::
<?php
$string = 'abc 123 車飛行 abc 5344';
$pattern = '/[^\p{Han}]/u';
$replacement = '';
echo preg_replace($pattern, $replacement, $string);
?>
::::::::::::::
test2.php
::::::::::::::
<?php
$message = "01. 你好";
echo preg_match_all("/^\p{Han}+$/u", $message);
echo "\n";
$message = "你好";
echo preg_match_all("/^\p{Han}+$/u", $message);
echo "\n";
$message = "01。你好";
echo preg_match_all("/^\p{Han}+$/u", $message);
echo "\n";
?>
The output of both codes are:
1) In order to extract only Chinese chars from the String.
$ php test.php
車飛行
2) In order to validate that the string does contain only Chinese chars.
$ php test2.php
0
1
0