Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要创建一个正则表达式来选择两个字符(& - @)之间的数据。
& foo @
我想选择foo。
有任何想法吗?好的解释也值得赞赏。
这个怎么样:
preg_match('~&([^@]*)@~',$content,$match);