結果 : get part of string before character javascript