You should not use g in the pattern, and you can simplify your regex:
preg_replace('/-+/', '-', $string);
Backslash screens are not required.
On http://ideone.com/IOlpv :
<? $string = "asdfsdfd----sdfsdfs-sdf-sdf"; echo preg_replace('/-+/', '-', $string); ?>
Conclusion:
asdfsdfd-sdfsdfs-sdf-sdf
source share