How to change continually repeated letter to single letter

How to change continually repeated letter to single letter like:

'---------------------' to '-'

I think it can be done by using "Replace with regular expression" function but i don't know how to use it..

Please help!

Reg exp: -+
replace: -

the + simply finds an infinity of the '-'