これは私の最初の質問で、文字列がめちゃくちゃです。次の形式の文字列がいくつかあります。
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 つだけが必要です (残りの文字列は名前として扱われます)。
期待される出力:
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' )
これを達成するための最良の方法は何ですか?