Preg match problem

I have the following regexp that I’d like to work even if the word after the @ symbol contains a dash (-). We have a Twitter-style pinging system on our web site, but there are certain usernames with dashes in them that cannot be pinged because our regexp doesn’t match it.

I’m not that experienced with regexp! :cool:

Thanks in advanced… here’s what I’m working with:

preg_match_all('/(^|\\s)@(\\w+)/', $post, $matches)
preg_match_all('/(^|\\s)@([\\w\\-]+)/', $post, $matches)

Thanks… works like a charm.