这个正则表达式是否需要PHP版本5.4+?

I'm using a shared hosting server that runs PHP version 5.3.28-nmm2. The following PHP code works for PHP 5.4 but doesn't work on my server:

$tweet = "hello world #dontremoveme foobar http://example.com/#dontremoveme #remove #removeme #removeüäüö";
$res = preg_replace("/ #\p{L}+\b(?!\s+\p{L})/u", '', $tweet);
echo $res,"
";

(it removes the hashtags from the end of the text)

There is no error, just no content in the $res echo. (completly empty) Does the code need PHP 5.4+, if so, what part of it?

This seems to work:

$res = preg_replace("/ #\w+/u", '', $tweet);


$tweet = "hello world #dontremoveme foobar http://example.com/#dontremoveme #remove #removeme #removeüäüö";
$res = preg_replace("/ #\w+/u", '', $tweet);
echo $res,"
";

RESULT PHP Version 5.3.29:

hello world foobar http://example.com/#dontremoveme