这是我在这里的第一个问题,我搞砸了字符串。我有一些以下格式的字符串:
I will be here (I may or may not be here) (30-Apr-2013)
I am still here (15-Feb-2013)
I am still here(I may not be here) (I may not be here) (9-Apr-2013)
我需要将日期与名称分开。如您所见,括号的数量可能会有所不同,但我只需要最后一个(字符串的其余部分将被视为名称)。
预期输出:
1. array( 0=> 'I will be here (I may or may not be here)' , 1=> '30-Apr-2013' )
2. array( 0=> 'I am still here' , 1=> '15-Feb-2013' )
3. array( 0=> ' I am still here(I may not be here) (I may not be here)' , 1=> '9-Apr-2013' )
实现这一目标的最佳方法是什么?