I have the following phrase and I need to remove English characters in PHP
$field = "日本語フレーズ A Japanese phrase A Japanese phrase 日本語フレーズ";
I have the following regex
trim(preg_replace('/[a-zA-Z]/', '', $field));
but this will lead to more than one gap between them.
日本語フレーズ 日本語フレーズ
I need to have only one space between them. Below is the expected result.
日本語フレーズ 日本語フレーズ
source
share