I need a regular in expression in PHP that I can plug into preg_match_all and find i开发者_运维百科f 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
An at sign followed by at least one letter, number, or underscore:
/@\w+/
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!
精彩评论