The title says it all.
This is what I have:
preg_match_all("/@[\w_.]+/",$text_tbh, $matches);
but that does not include words with special chars.
Thanks
The title says it all.
This is what I have:
preg_match_all("/@[\w_.]+/",$text_tbh, $matches);
but that does not include words with special chars.
Thanks
Use \S
which matches any non-white space character.
preg_match_all('/@\S+/', $text_tbh, $matches);