remove dash at begin and at end