使用preg_replace来表示日语

Basically I translated a string from english to japan like this:

$test1 = 1104 Notes receivable
$test2 = 1104 受取手形

My Goal is to remove the number on front of string. I use this regeX:

preg_replace('/^[^A-Za-z]+/', '', $test1)
output : Notes receivable

Now , how about the japanese ? I need this string : 受取手形

Code

See regex in use here

^\P{L}+

Usage

See code in use here

<?php

$strings = ["1104 Notes receivable", "1104 受取手形"];
foreach($strings as &$string) {
    $string = preg_replace('/^\P{L}+/', "", $string);
}
var_dump($strings);

Explanation

  • ^ Assert position at the start of the line.
  • \P{L}+ Matches any character that \p{L} does not (equivalent to [^\p{L}]), one or more times. \p{L} is a Unicode character class that matches any letter in any language/script.