This regex might solve 2 problems:
1. The ‘hyphen problem’ in hashtags;
2. The ‘foreign language characters problem’ in hashtags.
‘/(^|\s)#([\-\pL\w]+)/u’
In the code:
$msg = preg_replace(‘/(^|\s)#([\-\pL\w]+)/u’, “$1#$2$3 “, $msg);
So hashtags like #hour-s and #Utøya are so far now linkified.
Best Regards, Dick