标题说明了一切。
这是我所拥有的:
preg_match_all("/@['w_.]+/",$text_tbh, $matches);
但这不包括带有特殊字符的单词。
谢谢
使用与任何非空格字符匹配的'S
。
preg_match_all('/@'S+/', $text_tbh, $matches);
你抱怨什么特殊的字符?将它们包含在括号中!
即
preg_match_all("/@['w._#?!+]+/",$text_tbh, $matches);
标题说明了一切。
这是我所拥有的:
preg_match_all("/@['w_.]+/",$text_tbh, $matches);
但这不包括带有特殊字符的单词。
谢谢
使用与任何非空格字符匹配的'S
。
preg_match_all('/@'S+/', $text_tbh, $matches);
你抱怨什么特殊的字符?将它们包含在括号中!
即
preg_match_all("/@['w._#?!+]+/",$text_tbh, $matches);