例如我有文字。
$text = 'Hello dear friend, my name is Jacky.
I am 25 years old and @I am earning* $500 per month, but @I am going* to earn more';
我想在文本中查找以符号“@”开头并以符号“*”结尾的所有部分。在这个例子中,我想要这样的变量:
$found[1] = 'I am earning';
$found[2] = 'I am going';
谁能帮我解决这个问题?我使用 strstr(),但是当找到多个部分时它会失败。