【发布时间】:2014-07-18 09:59:20
【问题描述】:
我在 php 中有一个字符串说
$string = 'All I want to say is that <#they dont really care#> about us.
I am wasted away <#I made a million mistake#>, am I too late.
Theres a storm in my head and a race on my bed, <#when you are not near#>' ;
$expected_output = array(
'they dont really care',
'I made a million mistake',
'when you are not near'
);
如何使用 PHP regex 实现这一点? 感谢阅读:)
【问题讨论】:
标签: php regex preg-match preg-match-all pcre