$tweet = “this has a #hashtag a #badhash-tag and a #goodhash_tag”;
preg_match_all("/(#w+)/", $tweet, $matches);var_dump( $matches );*破折号是#号的非法字符,允许带下划线。

$tweet = “this has a #hashtag a #badhash-tag and a #goodhash_tag”;
preg_match_all("/(#w+)/", $tweet, $matches);var_dump( $matches );*破折号是#号的非法字符,允许带下划线。