Remove last character if =*

Same answer as here
/t/9261/1