tags:

views:

40

answers:

2

I need a regular in expression in PHP that I can plug into preg_match_all and find if an @ sign and any character number or letter follows right after that. So if I put "@patrick hello there" it will come up true, if I put in "I saw her @ the mall" it will be false. Thank you :)

+5  A: 

An at sign followed by at least one letter, number, or underscore:

/@\w+/
Ignacio Vazquez-Abrams
THANK YOU SOOO MUCH
Patrick Gates
A: 

Great site on Regex: http://www.regexlib.com/CheatSheet.aspx

as well as http://www.regular-expressions.info/ as the fellow below me pointed out!

VoodooChild
I'm a huge fan of http://www.regular-expressions.info/
kingjeffrey