1
我有一个简单的问题,我是PHP中的新手。从字符串中选择,直到下一个字符为英文字符
我有这样的样本串在PHP中:
this is a test sample thing
text @INEEDTOCHANGEHERE blah blah blah
this is a test sample thing
text @INEEDTOCHANGEHERE blah blah blah
this is a test sample thing
text @INEEDTOCHANGEHERE blah blah blah
...
我需要改变所有的 “INEEDTOCHANGEHERE” 从字符串。
它不依赖于此之后的空格字符。
因此,我必须找到“@”,然后选择每个英文字符(a-z)。
我该怎么做?
使用'preg_replace()'。 – Barmar
@Barmar请你给我规则? – Jolie
SO不是免费的编码服务。我们会帮助您修复代码,但我们不会为您完成您的工作。 – Barmar