Made the pattern in the first regex an utf-8 pattern, otherwise it could fail
This commit is contained in:
parent
97964f8237
commit
55211ce5bf
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
function hashtag($str,$ucfirst=true) {
|
||||
$str=preg_replace('#^\W*(.*)\W*$#','$1',$str);
|
||||
$str=preg_replace('#^\W*(.*)\W*$#u','$1',$str);
|
||||
$str=preg_split('#\W+#u',$str);
|
||||
$c=count($str);
|
||||
if ($c>1) {
|
||||
|
|
Loading…
Reference in a new issue