這是我的第一個問題,我弄亂了字符串。我有以下格式的一些字符串:括號內括號內的獨立字符串
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')
什麼是實現這一目標的最佳途徑?
@negvoters關心解釋這個問題有什麼問題? – Gogol 2016-03-15 07:24:30