fork download
  1. <?php
  2.  
  3. $s = "#早上";
  4. preg_match_all('/(?<!\S)#\w*\p{L}\w*/u', $s, $m);
  5. print_r($m);
Success #stdin #stdout 0.01s 52488KB
stdin
Standard input is empty
stdout
Array
(
    [0] => Array
        (
            [0] => #早上
        )

)