結果 : java get string before last occurrence of character