String replace all function in javascript