$string = '@English is a West Germanic @language that was first spoken in early medieval @England and is now a global lingua franca. @It is spoken as a first language by the';我如何删除以“在一个动作中”开头的所有单词?
链接str_replace()的东西呢?
`$result = 'is a West Germanic that was first spoken in early medieval and is now a global lingua franca. is spoken as a first language by the'`;发布于 2014-09-23 14:35:27
给你:
echo $string | sed -e 's/@\w*//g'这将与regex @\w*匹配的所有子字符串替换为空字符串。G标志确保匹配多个字符串。
https://stackoverflow.com/questions/25997486
复制相似问题