0
我该如何获得包含以大写字母和小写字母开头的单词?因为现在它只是小写。Preg Replace中的小写字母和大写字母
感谢堆
$string = "you would love this @matt";
$pattern = '/(^|\W)(@([a-z]+))/';
$replacement = '$1<a href="/user/$3">$2</a>';
echo preg_replace($pattern, $replacement, $string);