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